diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-03-01 00:23:52 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2018-03-01 00:23:52 +0200 |
commit | c9aeb55675730000418262a691add94f235a40ec (patch) | |
tree | 5b016e42b238ec8178b2606e346c152e160c0a20 /makeself/install-or-update.sh | |
parent | 8a48fb8650beed88863006c950a946ec690b08c8 (diff) |
set netdata user home directory; do not validate certs when sending alarms; attempt to detect ssl certs on static installations; fixes #3489
Diffstat (limited to 'makeself/install-or-update.sh')
-rwxr-xr-x | makeself/install-or-update.sh | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/makeself/install-or-update.sh b/makeself/install-or-update.sh index d1d9f4c879..f285c5d631 100755 --- a/makeself/install-or-update.sh +++ b/makeself/install-or-update.sh @@ -85,7 +85,7 @@ progress "Add user netdata to required user groups" NETDATA_USER="root" NETDATA_GROUP="root" -add_netdata_user_and_group +add_netdata_user_and_group "/opt/netdata" if [ $? -eq 0 ] then NETDATA_USER="netdata" @@ -94,6 +94,33 @@ else run_failed "Failed to add netdata user and group" fi +[ ~netdata = / ] && cat <<USERMOD + +The netdata user has its home directory set to / +You may want to change it, using this command: + +# usermod -m -d /opt/netdata netdata + +USERMOD + + +# ----------------------------------------------------------------------------- +progress "Check SSL certificates paths" + +if [ ! -f "/etc/ssl/certs/ca-certificates.crt" ] +then + if [ ! -f /opt/netdata/.curlrc ] + then + # CentOS + if [ -f "/etc/ssl/certs/ca-bundle.crt" ] + then + echo >/opt/netdata/.curlrc "cacert=/etc/ssl/certs/ca-bundle.crt" + else + run_failed "Failed to find /etc/ssl/certs/ca-certificates.crt" + fi + fi +fi + # ----------------------------------------------------------------------------- progress "Install logrotate configuration for netdata" |