do not instruct the movement of the home directory
Costa Tsaousis (ktsaou) committed
Mar 1, 2018 at 00:45 UTC
a42120c3ce67ac5c40a98ae17a1736fd53fd1e96
3 files changed
+17
-12
installer/functions.sh
+9
@@ -817,6 +817,15 @@ add_netdata_user_and_group() {
817
portable_add_user_to_group proxy netdata && NETDATA_ADDED_TO_PROXY=1
818
portable_add_user_to_group squid netdata && NETDATA_ADDED_TO_SQUID=1
819
portable_add_user_to_group ceph netdata && NETDATA_ADDED_TO_CEPH=1
820
+
821
+ [ ~netdata = / ] && cat <<USERMOD
822
+
823
+The netdata user has its home directory set to /
824
+You may want to change it, using this command:
825
+
826
+# usermod -d "${homedir}" netdata
827
+
828
+USERMOD
829
return 0
830
fi
831
makeself/install-or-update.sh
+7
-11
@@ -94,15 +94,6 @@ else
94
run_failed "Failed to add netdata user and group"
95
fi
96
97
-[ ~netdata = / ] && cat <<USERMOD
98
-
99
-The netdata user has its home directory set to /
100
-You may want to change it, using this command:
101
-
102
-# usermod -m -d /opt/netdata netdata
103
-
104
-USERMOD
105
-
97
98
# -----------------------------------------------------------------------------
99
progress "Check SSL certificates paths"
@@ -111,10 +102,15 @@ if [ ! -f "/etc/ssl/certs/ca-certificates.crt" ]
102
then
103
if [ ! -f /opt/netdata/.curlrc ]
104
then
105
+ cacert=
106
+
107
# CentOS
115
- if [ -f "/etc/ssl/certs/ca-bundle.crt" ]
108
+ [ -f "/etc/ssl/certs/ca-bundle.crt" ] && cacert="/etc/ssl/certs/ca-bundle.crt"
109
+
110
+ if [ ! -z "${cacert}" ]
111
then
117
- echo >/opt/netdata/.curlrc "cacert=/etc/ssl/certs/ca-bundle.crt"
112
+ echo "Creating /opt/netdata/.curlrc with cacert=${cacert}"
113
+ echo >/opt/netdata/.curlrc "cacert=${cacert}"
114
else
115
run_failed "Failed to find /etc/ssl/certs/ca-certificates.crt"
116
fi
netdata-installer.sh
+1
-1
@@ -642,7 +642,7 @@ run find ./system/ -type f -a \! -name \*.in -a \! -name Makefile\* -a \! -name
642
# -----------------------------------------------------------------------------
643
progress "Add user netdata to required user groups"
644
645
-homedir="${NETDATA_LIB_DIR}"
645
+homedir="${NETDATA_PREFIX}/var/lib/netdata"
646
[ ! -z "${NETDATA_PREFIX}" ] && homedir="${NETDATA_PREFIX}"
647
add_netdata_user_and_group "${homedir}" || run_failed "The installer does not run as root."
648