@cryptotaxi247 / netdata-1 / commits / 751775ccf

Properly skip running the updater in kickstart dry-run mode. (#12497)

Austin S. Hemmelgarn committed Mar 31, 2022 at 12:23 UTC 751775ccfadaaf2077fb6f2b7c611a66047d3a3c
1 file changed +8 -2
packaging/installer/kickstart.sh
+8 -2
@@ -933,14 +933,20 @@ set_auto_updates() {
933 fi
934
935 if [ "${NETDATA_AUTO_UPDATES}" = "1" ]; then
936 + if [ "${DRY_RUN}" -eq 1 ]; then
937 + progress "Would have attempted to enable automatic updates."
938 # This first case is for catching using a new kickstart script with an old build. It can be safely removed after v1.34.0 is released.
937 - if ! grep -q '\-\-enable-auto-updates' ${updater}; then
939 + elif ! grep -q '\-\-enable-auto-updates' ${updater}; then
940 echo
941 elif ! ${ROOTCMD} ${updater} --enable-auto-updates "${NETDATA_AUTO_UPDATE_TYPE}"; then
942 warning "Failed to enable auto updates. Netdata will still work, but you will need to update manually."
943 fi
944 else
943 - ${ROOTCMD} ${updater} --disable-auto-updates
945 + if [ "${DRY_RUN}" -eq 1 ]; then
946 + progress "Would have attempted to disable automatic updates."
947 + else
948 + ${ROOTCMD} ${updater} --disable-auto-updates
949 + fi
950 fi
951 }
952