Skip to content
This repository has been archived by the owner on Apr 22, 2020. It is now read-only.

Add example systemctl script #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions scripts/etc/systemd/newrelic-mysql-plugin.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[Unit]
Description=New Relic MySQL Plugin
After=network.target iptables.service firewalld.service firewalld.service httpd.service

[Service]
Type=simple
User=newrelic
PIDFile=/var/run/newrelic-mysql-plugin.pid
Restart=always
RestartSec=3
ExecStartPre=/usr/bin/rm -f /var/run/newrelic-mysql-plugin.pid
ExecStart=/usr/bin/java -Xmx128m "-Dnewrelic.platform.config.dir=/etc/newrelic/npi/plugins/com.newrelic.plugins.mysql.instance/newrelic_mysql_plugin-2.0.0/config" -jar "/etc/newrelic/npi/plugins/com.newrelic.plugins.mysql.instance/newrelic_mysql_plugin-2.0.0/plugin.jar"
StandardOutput=/etc/newrelic/npi/plugins/com.newrelic.plugins.mysql.instance/newrelic_mysql_plugin-2.0.0/daemon.log
ExecStop=/bin/kill -s HUP $MAINPID
ExecReload=/bin/kill -s HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=process

[Install]

WantedBy=multi-user.target