@cryptotaxi247 / netdata-1 / commits / 5a6db4bca

Small content change to the netdata-installer.sh (#4790)

* I'm suggesting a small content change to the instructions for users when running netdata-updater.sh. I've already seen in GH issues where people have asked for help. This content would make it clear what user the script needs to run as. * Small content change to the netdata-installer.sh

Bernard Tyers committed Nov 29, 2018 at 20:53 UTC 5a6db4bca6b601697d60053087b151016f054aaa
1 file changed +13 -13
netdata-installer.sh
+13 -13
@@ -273,39 +273,39 @@ if [ "${UID}" -ne 0 ]
273 then
274 netdata_banner "wrong command line options!"
275 cat <<NONROOTNOPREFIX
276 -
276 +
277 ${TPUT_RED}${TPUT_BOLD}Sorry! This will fail!${TPUT_RESET}
278 -
278 +
279 You are attempting to install netdata as non-root, but you plan
280 to install it in system paths.
281 -
281 +
282 Please set an installation prefix, like this:
283 -
283 +
284 $0 ${@} --install /tmp
285 -
285 +
286 or, run the installer as root:
287 -
287 +
288 sudo $0 ${@}
289 -
289 +
290 We suggest to install it as root, or certain data collectors will
291 not be able to work. Netdata drops root privileges when running.
292 So, if you plan to keep it, install it as root to get the full
293 functionality.
294 -
294 +
295 NONROOTNOPREFIX
296 exit 1
297
298 else
299 cat <<NONROOT
300 -
300 +
301 ${TPUT_RED}${TPUT_BOLD}IMPORTANT${TPUT_RESET}:
302 You are about to install netdata as a non-root user.
303 Netdata will work, but a few data collection modules that
304 require root access will fail.
305 -
305 +
306 If you installing netdata permanently on your system, run
307 the installer like this:
308 -
308 +
309 ${TPUT_YELLOW}${TPUT_BOLD}sudo $0 ${@}${TPUT_RESET}
310
311 NONROOT
@@ -1121,7 +1121,7 @@ export NETDATA_CONFIGURE_OPTIONS="${NETDATA_CONFIGURE_OPTIONS}"
1121 INSTALL_UID="${UID}"
1122 if [ "\${INSTALL_UID}" != "\${UID}" ]
1123 then
1124 - echo >&2 "This script should be run as user with uid \${INSTALL_UID} but it now runs with uid \${UID}"
1124 +echo >&2 "You are running this script as user with uid \${UID}. We recommend to run this script as root (user with uid 0)"
1125 exit 1
1126 fi
1127
@@ -1283,5 +1283,5 @@ else
1283 fi
1284
1285 echo >&2 " enjoy real-time performance and health monitoring..."
1286 -echo >&2
1286 +echo >&2
1287 exit 0