diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-01-20 18:41:52 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-01-20 18:41:52 +0200 |
commit | 4ffeeeb69e573c31cc44e8d181ed6196b19460ec (patch) | |
tree | c59687a9f28f0e9c7f888fddbc1d3f145582bdd5 /netdata-installer.sh | |
parent | 9baa3818d83af14277801debde53bed39c7efd72 (diff) |
when installing as non-root, use the default user group
Diffstat (limited to 'netdata-installer.sh')
-rwxr-xr-x | netdata-installer.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/netdata-installer.sh b/netdata-installer.sh index 70e59ce3f7..5f23e666e7 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -677,10 +677,11 @@ config_option() { if [ "${UID}" = "0" ] then NETDATA_USER="$( config_option "global" "run as user" "netdata" )" + NETDATA_GROUP="${NETDATA_USER}" else NETDATA_USER="${USER}" + NETDATA_GROUP="$(id -g -n ${NETDATA_USER})" fi -NETDATA_GROUP="${NETDATA_USER}" # the owners of the web files NETDATA_WEB_USER="$( config_option "web" "web files owner" "${NETDATA_USER}" )" |