On 10/11/2013 07:17 AM, David Strauss wrote:
We run New Relic extensively (at least a few hundred instances) for
our customers. Here's the native systemd service unit we use. I'm sure
we'd tweak it if we revisited it now, but it certainly works.
[Unit]
Description=New Relic Global Daemon
[Service]
ExecStart=/usr/bin/newrelic-daemon -c
/etc/newrelic/newrelic_global.cfg -l /var/log/newrelic-daemon.log -p
/var/run/newrelic-daemon.pid
ExecStop=/usr/bin/newrelic-daemon -c /etc/newrelic/newrelic_global.cfg
-C stop /dev/null 2>&1
PIDFile=/var/run/newrelic-daemon.pid
TimeoutSec=15
[Install]
WantedBy=multi-user.target
That's a lot of mess and we dont add "Daemon" into descriptions
Briefly based on looking at the rhel initscript for the new relic agent
we would implement this some where along these lines in Fedora I would
think.
( if type simple we drop the pidfile,the type entry and of course if
this cannot be run as the user remove it as well and change the tmpfile
entry to root root)
# newrelic-daemon.service
[Unit]
Description=New Relic Global
Documentation=https://docs.newrelic.com/docs
[Service]
User=newrelic
Type=forking
PIDFile=/var/run/newrelic/newrelic-daemon.pid
ExecStart=/usr/bin/newrelic-daemon -c /etc/newrelic/newrelic_global.cfg
[Install]
WantedBy=multi-user.target
# newrelic-plugin-agent.service #
[Unit]
Description=New Relic Plugin Agent
Documentation=https://docs.newrelic.com/docs
[Service]
User=newrelic
Type=forking
PIDFile=/var/run/newrelic/newrelic_plugin_agent.pid
ExecStart=/usr/bin/newrelic_plugin_agent -c
/etc/newrelic/newrelic_plugin_agent.cfg
[Install]
WantedBy=multi-user.target
# /etc/tmpfiles.d/newrelic.conf
D /var/run/newrelic 0755 newrelic newrelic
--
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel
Fedora Code of Conduct: http://fedoraproject.org/code-of-conduct