summaryrefslogtreecommitdiffstats
path: root/makeself
diff options
context:
space:
mode:
authorCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-04-01 22:34:17 +0300
committerCosta Tsaousis (ktsaou) <costa@tsaousis.gr>2017-04-01 22:34:17 +0300
commitd8f4940b79407f76f794a9b3fa517f068a2fa6b5 (patch)
tree9837d0f101ed81adde86a8b6c43ea5ad17200f61 /makeself
parente9a3df888cb516ac22af8555ee96b9652be9660d (diff)
properly detect if the user and group have been added
Diffstat (limited to 'makeself')
-rwxr-xr-xmakeself/install-or-update.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/makeself/install-or-update.sh b/makeself/install-or-update.sh
index 180c639d1a..2331305fb5 100755
--- a/makeself/install-or-update.sh
+++ b/makeself/install-or-update.sh
@@ -60,7 +60,16 @@ run rm -rf etc/netdata.new
# -----------------------------------------------------------------------------
progress "Add user netdata to required user groups"
-add_netdata_user_and_group || run_failed "The installer does not run as root."
+NETDATA_USER="root"
+NETDATA_GROUP="root"
+add_netdata_user_and_group
+if [ $? -eq 0 ]
+ then
+ NETDATA_USER="netdata"
+ NETDATA_GROUP="netdata"
+else
+ run_failed "Failed to add netdata user and group"
+fi
# -----------------------------------------------------------------------------