path: root/newrelic-sysmond.service
diff options
authorChris Severance2015-08-01 09:10:05 -0400
committerChris Severance2015-08-01 09:10:05 -0400
commit4fa8c845e6133712ef2c71e448cf072e0056abe9 (patch)
treed181c7b1db4a6b0606dc6056b99c715c45034557 /newrelic-sysmond.service
parentd77c11c1464c83e3205508188863e364cb8c55cf (diff)
PKGBUILD improvements, run as non root
Diffstat (limited to 'newrelic-sysmond.service')
1 files changed, 25 insertions, 2 deletions
diff --git a/newrelic-sysmond.service b/newrelic-sysmond.service
index 9def14256f1..bb43dabc5e4 100644
--- a/newrelic-sysmond.service
+++ b/newrelic-sysmond.service
@@ -1,11 +1,34 @@
-Description=System monitor Services Provided by Newrelic
+Description=New Relic Servers Server Monitor (newrelic-sysmond)
-ExecStart=/usr/bin/nrsysmond -c /etc/newrelic/nrsysmond.cfg -p /run/
+# Run ExecStartPre with root-permissions
+# This seems easier and more reliable than tmpfiles.d
+ExecStartPre=/usr/bin/touch /run/
+ExecStartPre=/usr/bin/chown NEWRELIC_USER:NEWRELIC_USER /run/
+# Run ExecStart with User
+ExecStart=/usr/bin/nrsysmond -c '/etc/newrelic/nrsysmond.cfg' -p '/run/'
+# Arch Linux:
+# The user and group must be the same. Change all 4 at once. Don't pick a system defined user.
+# If you change the user and group names after installation, you should:
+# 1) userdel 'olduser' # if it's not being used for something else
+# 2) groupdel 'olduser' # if it's not being used for something else
+# 3) rm -rf '/.olduser' # if there's nothing in here of importance
+# 4) newrelic-sysmond.inst install # to create new user, group, and to chown folders
+# If you uninstall another New Relic package and find that the user and group have disappeared
+# simply run: newrelic-sysmond.inst install
+# or just upgrade the package