summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/Makefile.am1
-rw-r--r--system/netdata-updater.conf7
-rw-r--r--system/openrc/init.d/netdata.in3
-rw-r--r--system/runit/run.in4
-rw-r--r--system/systemd/netdata.service.in5
-rw-r--r--system/systemd/netdata.service.v235.in11
6 files changed, 13 insertions, 18 deletions
diff --git a/system/Makefile.am b/system/Makefile.am
index 13466639d..54e9278c8 100644
--- a/system/Makefile.am
+++ b/system/Makefile.am
@@ -26,6 +26,7 @@ dist_config_SCRIPTS = \
dist_config_DATA = \
.install-type \
+ netdata-updater.conf \
$(NULL)
libconfigvnodesdir=$(libconfigdir)/vnodes
diff --git a/system/netdata-updater.conf b/system/netdata-updater.conf
new file mode 100644
index 000000000..6cf2062a1
--- /dev/null
+++ b/system/netdata-updater.conf
@@ -0,0 +1,7 @@
+# Configuration for netdata-updater.sh script.
+#
+# When run non-interactively, the updater script will delay some
+# random number of seconds up to NETDATA_UPDATER_JITTER before
+# actually running the update. The default is 3600 (one
+# hour). Most users should not need to change this.
+#NETDATA_UPDATER_JITTER="3600"
diff --git a/system/openrc/init.d/netdata.in b/system/openrc/init.d/netdata.in
index 74242b3cb..8dede179c 100644
--- a/system/openrc/init.d/netdata.in
+++ b/system/openrc/init.d/netdata.in
@@ -15,7 +15,6 @@ command_prefix="@sbindir_POST@"
command="${command_prefix}/netdata"
command_args="-P ${NETDATA_PIDFILE} ${NETDATA_EXTRA_ARGS}"
command_args_foreground="-D"
-start_stop_daemon_args="-u ${NETDATA_OWNER}"
depend() {
use logger
@@ -24,7 +23,7 @@ depend() {
}
start_pre() {
- checkpath -o ${NETDATA_OWNER} -d @localstatedir_POST@/cache/netdata @localstatedir_POST@/run/netdata
+ checkpath -o ${NETDATA_OWNER} -d @localstatedir_POST@/run/netdata
if [ -z "${supervisor}" ]; then
pidfile="${NETDATA_PIDFILE}"
diff --git a/system/runit/run.in b/system/runit/run.in
index 4ea783cc6..d7f39fb69 100644
--- a/system/runit/run.in
+++ b/system/runit/run.in
@@ -3,14 +3,10 @@
piddir="@localstatedir_POST@/run/netdata/netdata.pid"
pidfile="${piddir}/netdata.pid"
-cachedir="@localstatedir_POST@/cache/netdata"
-
command="@sbindir_POST@/netdata"
command_args="-P ${pidfile} -D"
[ ! -d "${piddir}" ] && mkdir -p "${piddir}"
-[ ! -d "${cachedir}" ] && mkdir -p "${cachedir}"
chown -R @netdata_user_POST@ "${piddir}"
-chown -R @netdata_user_POST@ "${cachedir}"
exec ${command} ${command_args}
diff --git a/system/systemd/netdata.service.in b/system/systemd/netdata.service.in
index 25d95b2b8..afdac114c 100644
--- a/system/systemd/netdata.service.in
+++ b/system/systemd/netdata.service.in
@@ -7,8 +7,7 @@ After=network.target httpd.service squid.service nfs-server.service mysqld.servi
[Service]
Type=simple
-User=@netdata_user_POST@
-Group=netdata
+User=root
RuntimeDirectory=netdata
RuntimeDirectoryMode=0775
PIDFile=/run/netdata/netdata.pid
@@ -60,6 +59,8 @@ CapabilityBoundingSet=CAP_SYS_CHROOT
CapabilityBoundingSet=CAP_NET_ADMIN
# is required for plugins that use sudo
CapabilityBoundingSet=CAP_SETGID CAP_SETUID
+# is required to change file ownership
+CapabilityBoundingSet=CAP_CHOWN
# Sandboxing
ProtectSystem=full
diff --git a/system/systemd/netdata.service.v235.in b/system/systemd/netdata.service.v235.in
index e3232056f..be5de4e36 100644
--- a/system/systemd/netdata.service.v235.in
+++ b/system/systemd/netdata.service.v235.in
@@ -7,16 +7,7 @@ After=network.target httpd.service squid.service nfs-server.service mysqld.servi
[Service]
Type=simple
-User=@netdata_user_POST@
-Group=netdata
-RuntimeDirectory=netdata
-CacheDirectory=netdata
-StateDirectory=netdata
-LogsDirectory=netdata
-RuntimeDirectoryMode=0775
-StateDirectoryMode=0755
-CacheDirectoryMode=0755
-LogsDirectoryMode=2750
+User=root
EnvironmentFile=-/etc/default/netdata
ExecStart=@sbindir_POST@/netdata -D $EXTRA_OPTS