@cryptotaxi247 / netdata-1 / commits / c2abee833

detect when netdata-installer.sh is run without ./; fixes #3940

Costa Tsaousis (ktsaou) committed Jul 8, 2018 at 04:03 UTC c2abee833c42dfd247f748d2854007ec120a1839
1 file changed +1
netdata-installer.sh
+1
@@ -80,6 +80,7 @@ REINSTALL_COMMAND="$(printf "%q " "$0" "${@}"; printf "\n")"
80 # remove options that shown not be inherited by netdata-updater.sh
81 REINSTALL_COMMAND="${REINSTALL_COMMAND// --dont-wait/}"
82 REINSTALL_COMMAND="${REINSTALL_COMMAND// --dont-start-it/}"
83 +[ "${REINSTALL_COMMAND:0:1}" != "." -a "${REINSTALL_COMMAND:0:1}" != "/" -a -f "./${0}" ] && REINSTALL_COMMAND="./${REINSTALL_COMMAND}"
84
85 setcap="$(which setcap 2>/dev/null || command -v setcap 2>/dev/null)"
86