summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/Makefile.am1
-rwxr-xr-xsystem/edit-config4
-rwxr-xr-xsystem/install-service.sh.in2
-rw-r--r--system/launchd/netdata.plist.in1
-rw-r--r--system/systemd/netdata.service.in5
-rw-r--r--system/systemd/netdata.service.v235.in3
6 files changed, 12 insertions, 4 deletions
diff --git a/system/Makefile.am b/system/Makefile.am
index 54e9278c8..1e96f6f4f 100644
--- a/system/Makefile.am
+++ b/system/Makefile.am
@@ -3,6 +3,7 @@
MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
CLEANFILES = \
+ install-service.sh \
cron/netdata-updater-daily \
freebsd/rc.d/netdata \
initd/init.d/netdata \
diff --git a/system/edit-config b/system/edit-config
index 74f3634c3..3944810d2 100755
--- a/system/edit-config
+++ b/system/edit-config
@@ -112,8 +112,10 @@ check_editor() {
running_in_container() {
[ -e /.dockerenv ] && return 0
[ -e /.dockerinit ] && return 0
- [ -r /proc/1/environ ] && tr '\000' '\n' </proc/1/environ | grep -Eiq '^container=podman' && return 0
+ [ -e /run/.containerenv ] && return 0
+ [ -r /proc/1/environ ] && tr '\000' '\n' </proc/1/environ | grep -Eiq 'container=' && return 0
grep -qF -e /docker/ -e /libpod- /proc/self/cgroup 2>/dev/null && return 0
+ return 1
}
get_docker_command() {
diff --git a/system/install-service.sh.in b/system/install-service.sh.in
index a885a8618..cdd1bf52f 100755
--- a/system/install-service.sh.in
+++ b/system/install-service.sh.in
@@ -625,7 +625,7 @@ freebsd_cmds() {
install_darwin_service() {
info "Installing macOS plist file for launchd."
- if ! install -C -S -p -m 0644 -o 0 -g 0 system/launchd/netdata.plist /Library/LaunchDaemons/com.github.netdata.plist; then
+ if ! install -C -S -p -m 0644 -o 0 -g 0 "${SVC_SOURCE}/launchd/netdata.plist" /Library/LaunchDaemons/com.github.netdata.plist; then
error "Failed to copy plist file."
exit 4
fi
diff --git a/system/launchd/netdata.plist.in b/system/launchd/netdata.plist.in
index a969b3177..bce489efa 100644
--- a/system/launchd/netdata.plist.in
+++ b/system/launchd/netdata.plist.in
@@ -8,6 +8,7 @@
<key>ProgramArguments</key>
<array>
<string>@sbindir_POST@/netdata</string>
+ <string>-D</string>
</array>
<key>RunAtLoad</key>
<true/>
diff --git a/system/systemd/netdata.service.in b/system/systemd/netdata.service.in
index afdac114c..7d15dad77 100644
--- a/system/systemd/netdata.service.in
+++ b/system/systemd/netdata.service.in
@@ -3,9 +3,10 @@
Description=Real time performance monitoring
# append here other services you want netdata to wait for them to start
-After=network.target httpd.service squid.service nfs-server.service mysqld.service mysql.service named.service postfix.service chronyd.service
+After=network.target
[Service]
+LogNamespace=netdata
Type=simple
User=root
RuntimeDirectory=netdata
@@ -61,6 +62,8 @@ CapabilityBoundingSet=CAP_NET_ADMIN
CapabilityBoundingSet=CAP_SETGID CAP_SETUID
# is required to change file ownership
CapabilityBoundingSet=CAP_CHOWN
+# is required for logs-management.plugin
+CapabilityBoundingSet=CAP_SYSLOG
# Sandboxing
ProtectSystem=full
diff --git a/system/systemd/netdata.service.v235.in b/system/systemd/netdata.service.v235.in
index be5de4e36..06f03b269 100644
--- a/system/systemd/netdata.service.v235.in
+++ b/system/systemd/netdata.service.v235.in
@@ -3,9 +3,10 @@
Description=Real time performance monitoring
# append here other services you want netdata to wait for them to start
-After=network.target httpd.service squid.service nfs-server.service mysqld.service mysql.service named.service postfix.service chronyd.service
+After=network.target
[Service]
+LogNamespace=netdata
Type=simple
User=root
EnvironmentFile=-/etc/default/netdata