properly detect if the user and group have been added
Costa Tsaousis (ktsaou) committed
Apr 1, 2017 at 22:34 UTC
d8f4940b79407f76f794a9b3fa517f068a2fa6b5
1 file changed
+10
-1
makeself/install-or-update.sh
+10
-1
@@ -60,7 +60,16 @@ run rm -rf etc/netdata.new
60
# -----------------------------------------------------------------------------
61
progress "Add user netdata to required user groups"
62
63
-add_netdata_user_and_group || run_failed "The installer does not run as root."
63
+NETDATA_USER="root"
64
+NETDATA_GROUP="root"
65
+add_netdata_user_and_group
66
+if [ $? -eq 0 ]
67
+ then
68
+ NETDATA_USER="netdata"
69
+ NETDATA_GROUP="netdata"
70
+else
71
+ run_failed "Failed to add netdata user and group"
72
+fi
73
74
75
# -----------------------------------------------------------------------------