diff options
Diffstat (limited to 'packaging/installer')
-rwxr-xr-x | packaging/installer/netdata-updater.sh | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packaging/installer/netdata-updater.sh b/packaging/installer/netdata-updater.sh index 781575c711..38f91aec26 100755 --- a/packaging/installer/netdata-updater.sh +++ b/packaging/installer/netdata-updater.sh @@ -185,8 +185,8 @@ update() { do_not_start="--dont-start-it" fi - if [ -n "${NETDATA_SELECTED_DASHBOARD}" ] ; then - env="NETDATA_SELECTED_DASHBOARD=${NETDATA_SELECTED_DASHBOARD}" + if [ -n "${NETDATA_SELECTED_DASHBOARD}" ]; then + env="NETDATA_SELECTED_DASHBOARD=${NETDATA_SELECTED_DASHBOARD}" fi info "Re-installing netdata..." @@ -210,6 +210,14 @@ tmpdir= trap cleanup EXIT +# Random sleep to aileviate stampede effect of Agents upgrading +# and disconnecting/reconnecting at the same time (or near to). +# But only we're not a controlling terminal (tty) +# Randomly sleep between 1s and 60m +if [ ! -t 1 ]; then + sleep $(((RANDOM % 3600) + 1))s +fi + # Usually stored in /etc/netdata/.environment : "${ENVIRONMENT_FILE:=THIS_SHOULD_BE_REPLACED_BY_INSTALLER_SCRIPT}" |