summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-admin/mms-agent/files/mms-monitoring-agent.initd')
-rw-r--r--app-admin/mms-agent/files/mms-monitoring-agent.initd25
1 files changed, 25 insertions, 0 deletions
diff --git a/app-admin/mms-agent/files/mms-monitoring-agent.initd b/app-admin/mms-agent/files/mms-monitoring-agent.initd
new file mode 100644
index 000000000000..76d58aca1c7b
--- /dev/null
+++ b/app-admin/mms-agent/files/mms-monitoring-agent.initd
@@ -0,0 +1,25 @@
+#!/sbin/runscript
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+logfile=/var/log/mongodb/mms-monitoring-agent.log
+run_dir=${run_dir:-/run/mongodb}
+
+command="./mongodb-mms-monitoring-agent &>${logfile}"
+command_background="true"
+
+pidfile=${run_dir}/${SVCNAME}.pid
+user=${user:-mongodb}
+group=${group:-mongodb}
+start_stop_daemon_args="--user ${user} --group ${group}"
+
+depend() {
+ need net
+ use syslog
+}
+
+start_pre() {
+ checkpath -d -m 0750 -o "${user}":"${group}" "${run_dir}"
+ cd /opt/mms-monitoring-agent
+}