kickstart-static64.sh passes --auto-update to netdata-latest.gz.run (#7076)
* kickstart-static64.sh passes --auto-update to netdata-latest.gz.run * Minor nitpicks for kickstart-static64.sh
Konstantinos Natsakis committed
Oct 28, 2019 at 17:37 UTC
b3ce23cfa69508425f522b6f7fbbcd1a8dfdf68e
3 files changed
+19
-8
packaging/installer/README.md
+5
-1
@@ -109,7 +109,7 @@ This script installs Netdata at `/opt/netdata`.
109
Verify the integrity of the script with this:
110
111
```bash
112
-[ "c529e4eb7ce201845cef605d450f8380" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
112
+[ "7c3471506f548968edbbf8d085fbea65" = "$(curl -Ss https://my-netdata.io/kickstart-static64.sh | md5sum | cut -d ' ' -f 1)" ] && echo "OK, VALID" || echo "FAILED, INVALID"
113
```
114
115
*It should print `OK, VALID` if the script is the one we ship.*
@@ -596,7 +596,11 @@ By default, Netdata's installation scripts enable automatic updates for both nig
596
If you would prefer to manually update your Netdata agent, you can disable automatic updates by using the `--no-updates` option when you install or update Netdata using the [one-line installation script](#one-line-installation).
597
598
```bash
599
+# kickstart.sh
600
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --no-updates
601
+
602
+# kickstart-static64.sh
603
+bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh) --no-updates
604
```
605
606
With automatic updates disabled, you can choose exactly when and how you [update Netdata](UPDATE.md).
packaging/installer/UPDATE.md
+7
-3
@@ -29,10 +29,14 @@ Keep in mind, Netdata may now have new features, or certain old features may now
29
30
### Manual update to get the latest nightly build
31
32
-The `kickstart.sh` one-liner will do a one-time update to the latest nightly build, if executed as follows:
32
+The `kickstart.sh` and `kickstart-static64.sh` one-liners will do a one-time update to the latest nightly build, if executed as follows:
33
34
```sh
35
+# kickstart.sh
36
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --no-updates
37
+
38
+# kickstart-static64.sh
39
+bash <(curl -Ss https://my-netdata.io/kickstart-static64.sh) --no-updates
40
```
41
42
### Auto-update
@@ -42,11 +46,11 @@ _Please, consider the risks of running an auto-update. Something can always go w
46
Calling the `netdata-installer.sh` with the `--auto-update` or `-u` option will create the `netdata-updater` script under
47
either `/etc/cron.daily/`, or `/etc/periodic/daily/`. Whenever the `netdata-updater` is executed, it checks if a newer nightly build is available and then handles the download, installation and Netdata restart.
48
45
-Note that after Jan 2019, the `kickstart.sh` one-liner `bash <(curl -Ss https://my-netdata.io/kickstart.sh)` calls the `netdata-installer.sh` with the auto-update option. So if you just run the one-liner without options once, your Netdata will be kept auto-updated.
49
+Note that after Jan 2019, the `kickstart.sh` one-liner `bash <(curl -Ss https://my-netdata.io/kickstart.sh)` calls the `netdata-installer.sh` with the auto-update option. So if you just run the one-liner without options once, your Netdata will be kept auto-updated. The same applies to the `kickstart-static64.sh` one-liner since Oct 2019.
50
51
## You downloaded a binary package
52
49
-If you installed it from a binary package, the best way is to **obtain a newer copy** from the source you got it in the first place. This includes the static binary installation via `kickstart-base64.sh`, which would need to be executed again.
53
+If you installed it from a binary package, the best way is to **obtain a newer copy** from the source you got it in the first place.
54
55
If a newer version of Netdata is not available from the source you got it, we suggest to uninstall the version you have and follow the [installation](README.md) instructions for installing a fresh version of Netdata.
56
packaging/installer/kickstart-static64.sh
+7
-4
@@ -183,14 +183,18 @@ fi
183
184
# ---------------------------------------------------------------------------------------------------------------------
185
opts=
186
-inner_opts=
186
+NETDATA_INSTALLER_OPTIONS=""
187
+NETDATA_UPDATES="--auto-update"
188
RELEASE_CHANNEL="nightly"
189
while [ -n "${1}" ]; do
190
if [ "${1}" = "--dont-wait" ] || [ "${1}" = "--non-interactive" ] || [ "${1}" = "--accept" ]; then
191
opts="${opts} --accept"
192
shift 1
193
elif [ "${1}" = "--dont-start-it" ]; then
193
- inner_opts="${inner_opts} ${1}"
194
+ NETDATA_INSTALLER_OPTIONS="${NETDATA_INSTALLER_OPTIONS:+${NETDATA_INSTALLER_OPTIONS} }${1}"
195
+ shift 1
196
+ elif [ "${1}" = "--no-updates" ]; then
197
+ NETDATA_UPDATES=""
198
shift 1
199
elif [ "${1}" = "--stable-channel" ]; then
200
RELEASE_CHANNEL="stable"
@@ -214,7 +218,6 @@ while [ -n "${1}" ]; do
218
exit 1
219
fi
220
done
217
-[ -n "${inner_opts}" ] && inner_opts="-- ${inner_opts}"
221
222
# ---------------------------------------------------------------------------------------------------------------------
223
TMPDIR=$(create_tmp_directory)
@@ -238,7 +241,7 @@ fi
241
242
# ---------------------------------------------------------------------------------------------------------------------
243
progress "Installing netdata"
241
-run ${sudo} sh "${TMPDIR}/netdata-latest.gz.run" ${opts} ${inner_opts}
244
+run ${sudo} sh "${TMPDIR}/netdata-latest.gz.run" ${opts} -- ${NETDATA_UPDATES} ${NETDATA_INSTALLER_OPTIONS}
245
246
#shellcheck disable=SC2181
247
if [ $? -eq 0 ]; then