summaryrefslogtreecommitdiffstats
path: root/packaging/makeself/install-or-update.sh
AgeCommit message (Collapse)Author
2022-08-11fix(packaging): add CAP_NET_ADMIN for go.d.plugin (#13507)Ilya Mashchenko
2022-06-09Remove unnescesary ‘cleanup’ code. (#13103)Austin S. Hemmelgarn
This was causing the updter to be unconditionally disabled on static builds, and we don’t actually _need_ any of it anymore since we’ve already decoupled the auto-update handling state from the installation process (in fact, this should have been removed then, but it got missed somehow).
2022-03-22Switch to using netdata-updater.sh to toggle auto updates on and off when ↵Austin S. Hemmelgarn
installing. (#12296) * Switch to using netdata-updater.sh to toggle auto updates on and off on install. * Apply suggestions from code review Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com> * Make heading name less ambiguous. * Fix fallback case for unsupported updater script. * Fix invalid function name. Co-authored-by: Tina Luedtke <kickoke@users.noreply.github.com>
2022-02-18Revert "Overhaul handling of auto-updates in the installer code. (#12076)" ↵Austin S. Hemmelgarn
(#12182) This reverts commit da7f215ad6c98cbf54ab93dbc1d2457ac01dbb08.
2022-02-18Overhaul handling of auto-updates in the installer code. (#12076)Austin S. Hemmelgarn
* Bundle updater script in native packages. * Move code for enabling/disabling auto-updates to netdata-updater.sh This lets us handle the logic sanely from the kickstart script regardless of the install method, and allows users to more reliably toggle auto-updates themselves without having to understand what is being done. * Add proper case-agnosticism to auto-update type selection. * Move auto-updater handling code to kickstart script. * Properly handle running against an older source tree. * First part of updater docmentation updates. * Fixed handling of updater in DEB packages. * Further documentation updates. * Minor typo fixes.
2022-02-15rename DO_NOT_TRACK to DISABLE_TELEMETRY (#12126)Ilya Mashchenko
2022-01-19fix permissions of plugins that may be built (#11877)boxjan
Co-authored-by: Ilya Mashchenko <ilya@netdata.cloud>
2021-10-29Bring eBPF to static binaries (#11709)thiagoftsm
2021-10-21Fix handling of disabling telemetry in static builds. (#11689)Austin S. Hemmelgarn
2021-04-05Spelling build (#10428)Josh Soref
* spelling: alleviate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: available Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: berkeley Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: cannot Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: centos Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: context Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: continuously Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: correlate Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: defaults Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: dependencies Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: dependency Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: different Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: doesn't Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: example Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: forbidden Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: necessary Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: nightly Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: normally Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: notification Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: overridden Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: packet Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: program Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: prompted for Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: proxyadmin Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: red hat Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: relative Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: script Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: scriptlet Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: somewhere Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: spinning Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: substitution Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: success Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: successfully Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: sysadmin Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: tarball Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: telemetry Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: temporary Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: timeout Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: unsupported Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: updates Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: useful Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * spelling: way Signed-off-by: Josh Soref <jsoref@users.noreply.github.com> * Update kickstart script checksums in documentation Co-authored-by: Vladimir Kobal <vlad@prokk.net>
2021-01-13Fixed handling of TLS config so that cURL works in all cases. (#10491)Austin S. Hemmelgarn
We should not be hard-coding the CA file or messing with cURL options to handle this, but should instead be relying on the config detected at setup time for the install to just get it right (as it will in 99% of cases).
2020-06-05Fixed handling of OpenSSL on CentOS/RHEL by bundling a static copy and ↵Austin S. Hemmelgarn
selecting a configuration directory at install time. (#9263) * Bundle static OpenSSL in our static builds. This adds code to bundle a static locally built copy of OpenSSL into our static builds instead of using the Alpine provided copy. It fixes two cases where our usage of OpenSSL currently fails: * On CentOS, RHEL, OEL, Amazon Linux, and their derivatives, the OpenSSL configuration directory is `/etc/pki/tls` instead of the normal `/etc/ssl`. Any usage of TLS in our static builds currently fails there because it can't find that directory. * TLS usage fails similarly on systems that do not have OpenSSL at all for the same reason. To fix this, the newly bundled copy of OpenSSL is built to use `/opt/netdata/etc/ssl` as it's configuration directory. This directory is a symlink created at install time pointing to one of the following locations (in order of precedence): * `/etc/pki/tls` (for CentOS, RHEL, OEL, AL, and similar). * `/etc/ssl` (for sane distros that just use the default path). * `/opt/netdata/share/ssl` (for systems that don't have OpenSSL, this contains a copy of the config and certificates from the build environment). * Ensure other components are built with local OpenSSL. * Clone directly from the desired tag.
2020-01-31Fixes a bug in DO_NOT_TRACK expression (#7929)James Mills
* Fixed bug in DO_NOT_TRACK expression * Fix kickstart-static64 checksum in docs. Co-authored-by: Austin S. Hemmelgarn <ahferroin7@gmail.com>
2020-01-30Adds support for opting out of telemetry via the DO_NOT_TRACK envirnment ↵James Mills
variable (#7846) * Added support for opting out of telemtry via the DO_NOT_TRACK environment variable * Added support for DO_NOT_TRACK=1 in anonymous-statistics.sh and minor cleanup in Dockerfile and run.sh entrypoint * Allow DO_NOT_TRACK to be either non-zero or non-empty * Update md5sum of kickstart-static64.sh in docs * Fixed a bug in netdata-installer.sh * Revert changes to daemon/main.c (testing onyl) * Update docs/anonymous-statistics.md Co-Authored-By: Mansour Behabadi <57921115+ncmans@users.noreply.github.com> Co-authored-by: Mansour Behabadi <57921115+ncmans@users.noreply.github.com>
2020-01-28Fixes and improves the installer/updater shell scripts. (#7847)James Mills
* Auto-formatted the installer/updater shell scripts * Fixed shellcheck problems founds for installer/updater shell scripts * Update netdata-installer.sh Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> * Update packaging/installer/kickstart-static64.sh Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> * Update packaging/makeself/install-or-update.sh Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> * Updated md5sum of kickstart-static64.sh in docs * Fixed bad rebase/merge conflicts Co-authored-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
2020-01-14Make auto-updates work on kickstart-static64 installs. (#7704)Austin S. Hemmelgarn
* Store only the options for reinstall, not the full command. This simplifies handling of updates with the static installer. * Properly utilize the updater for static installs. * Disable auto-updater when using local files. If using local files, we can probably assume a system without a network connection, so don't enable the auto-updater. * Document support for auto-updates from kickstart-static64 * Fix infinite loop in auto-update option. * Update kickstart-static64 checksum in docs. * Remove unnecessary `sed` argument. Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> Co-authored-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
2019-12-20packaging: Set default release channel to stable for gh releases (#7399)Mansour Behabadi
* packaging: Set default release channel to stable for gh releases * Leave kickstart files alone * Update .travis/create_artifacts.sh Co-Authored-By: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com> Co-authored-by: Mansour Behabadi <mansour@oxplot.com> Co-authored-by: Konstantinos Natsakis <5933427+knatsakis@users.noreply.github.com>
2019-12-19Add anon tracking notice for installers (#7437)Mansour Behabadi
* Show notice of anonymous data collection * Add DO_NOT_TRACK env var to docker run script * Add disable-telemetry option to kickstart-static64 * Check if DO_NOT_TRACK is set
2019-11-11Ownership and permissions of /etc/netdata (#7244)Konstantinos Natsakis
* make install takes care of ownership and permissions of /etc/netdata Instead of netdata-installer.sh * Fix identation in Makefile.am files * netdata-installer.sh: Clearer variable assignment * netdata-installer.sh: Set /etc/netdata/netdata.conf ownership to root:root and permissions to 0644 * netdata-installer.sh: Set /etc/netdata/.environment permissions to 0644 * install-or-update.sh: Set permissions for /opt/netdata/etc/netdata.conf to 0644 * install-or-update.sh: Use ${NETDATA_PREFIX} more * install-or-update.sh: Improve indentation * install-or-update.sh: Do not create /opt/netdata/etc/netdata directories * debian/rules: /etc/netdata files and directories are now installed by make install * debian/rules: Properly copy files across directories When destination directory exists * netdata.spec.in: /etc/netdata ownership and permissions * Revert "Fix identation in Makefile.am files" This reverts commit 63fdb299b69152fda6984f81b0fef02f364c5efe. * Remove uninstall-local recipes from Makefile.am files * Removed superfluous whitespace and hash
2019-10-22add support for am2320 sensor (#7024)Tom Buck
* add support for am2320 sensor add support for am2320 temperature and humidity sensor * Rename readme.md to README.md * updated README.md to include proper sections updated README.md to include proper sections * readme updated and file name corrected readme updated with missing formatting and information. AM2320.chart.py filename corrected. * changed simple service import chnaged simple service import location * updated README.md to remove the reference of moving the script file. * requested changes - Moved header from README.md to am2320.chart.py - Added Alarm for am2320 to health.d - Changed exception to value error in am2320.chart.py * typo changed mae to make in comment * Add title and icon for AM2320 Sensor Add title and icon for AM2320 Sensor * typo corrected changed Save to save * added I2C group to installer Added netdata to the I2C group during install or update. Removed instruction to add netdate to I2C group from README.md * change tab to spaces change tab to spaces
2019-10-187040 enable stable channel option (#7082)Konstantinos Natsakis
* Partial fix for #7040 install-or-update.sh now accepts the --stable-channel option * Add missing quotes to sed command
2019-10-17Partial fix for #7039 (#7060)Konstantinos Natsakis
* Partial fix for #7039 Moved updater installation code from netdata-installer.sh to packaging/installer/functions.sh packaging/makeself/install-or-update.sh uses above code to install netdata updater - Moved updater installation code to packaging/installer/functions.sh - packaging/makeself/install-or-update.sh uses above code to install netdata updater * Split install_or_remove_netdata_updater() function * Improved netdata-updater related message output * Improved variable declaration location in install-or-update.sh
2019-08-29netdata/installer: fix static64 installer always overwriting configuration ↵Paul Emm. Katsoulakis
(#6710) * netdata/packaging: static installer - back up configuration directory, if it already exists * netdata/packaging: keep more versions of it, we will consider how to consolidate too old ones * netdata/packaging: At the post install activities, if .old directory was in place, reinstate it (WIP) * netdata/packaging: Attempt to trigger stock config refresh * netdata/packaging: the .new directory is just the latest one, no need to keep it when re-running * netdata/packaging: dont do -f, its -d to confirm existence of dir
2019-05-31SSL implementation for Netdata (#5956)thiagoftsm
* SSL implementation for Netdata * Upload of fixes asked by @paulkatsoulakis and @cakrit * Fix local computer * Adding openssl to webserver * fixing.. * HTTPS almost there * Codacity * HTTPS day 3 * HTTPS without Bio step 1 * HTTPS without Bio step 2 * HTTPS without Bio step 3 * HTTPS without Bio step 4 * HTTPS without Bio step 5 * HTTPS without Bio step 6 * HTTPS without Bio step 7 * HTTPS without Bio step 8 * HTTPS without Bio step 9 * HTTPS without Bio step 10 * SSL on streaming 1 * Daily pull * HTTPS without Bio step 11 * HTTPS without Bio step 12 * HTTPS without Bio step 13 * HTTPS without Bio step 14 * SSL_Interception change documentation * HTTPS without Bio step 15 * HTTPS without Bio step 16 * SSL_Interception fix codacity * SSL_Interception fix doc * SSL_Interception comments * SSL_Interception fixing problems! * SSL_Interception killing bugs * SSL_Interception changing parameter * SSL_Implementation documentation and script * SSL_Implementation multiple fixes * SSL_Implementation installer and cipher * SSL_Implementation Redirect 301 * SSL_Implementation webserver doc and install-or-update.sh * SSL_Implementation error 00000001:lib(0):func(0):reason(1) * SSL_Implementation web server doc * SSL_Implementation SEGFAULT on Fedora * SSL_Implementation fix ^SSL=force|optional * SSL_Implementation Redirect and Ciphers * SSL_Implementation race condition 1 * SSL_Implementation Fix Location * SSL_Implementation Fix Location 2 * SSL_Implementation Fix stream * SSL_Implementation Fix stream 2 * SSL_Implementation Fix stream 3 * SSL_Implementation last problems! * SSL_Implementation adjusts to commit! * SSL_Implementation documentation permission! * SSL_Implementation documentation permission 2! * SSL_Implementation documentation permission 3!
2019-05-28Add "custom-plugins.d" to fix error in log file (#6080)Steve8291
default netdata.conf file references this dir but installer doesn't create it. Trying to get rid of the following error from /var/log/netdata/error.log ERROR : PLUGINSD : cannot open plugins directory '/etc/netdata/custom-plugins.d' (errno 2, No such file or directory)
2019-04-23Add ioping plugin (#5725)Vladimir Kobal
* Add ioping plugin * Update the documentation and comments * Finalize installation of ioping * Fix find_processors variable * Fix static build * Move ioping to libexec directory * Move ioping to plugins.d directory * Fix file existence check
2019-04-05netdata/packaging/installer: HoS situation - Fix broken install-or-update ↵Paul Emm. Katsoulakis
script (#5806) During the last major installer refactoring, we managed to break (again) the static64 installer. We modified the code that defines user/group ownerships for netdata installation, forcing the install to end up with a process running as netdata and files set as root To fix this, we re-instate default NETDATA_USER/NETDATA_GROUP to root, as it should be. Then we attempt group netadata creation. If that succeeds, we attempt user netdata creation. If that succeeds, we attempt secondary groups addition. Report errors on all otherwise situations from each step.
2019-03-29netdata/packaging/installer: netdata-installer.sh script (and subscripts) ↵Paul Katsoulakis
refactoring wrap-up (#5736) * remove dead quickfix * unify global variable naming * do not use double negation * simplify setcap detection * simplify logic of setting capabilities to apps.plugin * always set group in chown * simplify parameter parsing and banner notifications * use built-in command for checking program availability * lint functions.sh * fix errors returned by shellcheck * remove unused functions and use portable_service * move user management functions closer together and remove "check" functions to reduce levels of indirection * extract add_netdata_user_and_group and move it into installers for better code readability * improve readability by not using global variable holding number of processors * move netdata.conf file creation into one function * revert migration to portable_service * Less verbose setcap * remove TODOs * do not show output when not needed * fix checking for group existence * fix variable name * netdata/packaging/installer: Dont spill out unnecessary output in stdout/stderr, it may confuse our users The second commit was a follow up cleanup on nits. * access: change codeowner * Revert "access: change codeowner" This reverts commit 6ee51ccae960584d5b1b7c243f5aabf046a99eff. sorry, wrong repo * netdata/packaging/installer: bug fix - do not use pidof as the name of the helper method 1) rename to safe_pidof, which is actually more accurate and describe what this method serves for (safe pid detection) 2) Renaming it also avoids the bug introduced by the usage of , that resulted in endless nested calls of the BASH method pidif (Refer to command -v usage)
2019-01-02move makeself (#4688)Paweł Krupa