blob: 66d408b0832251924a0d65f07bea74f829f6df12 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/sbin/runscript
# Copyright 1999-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
ROOTDIR=/opt/mms-agent
PIDFILE=/var/run/mm-agent.pid
EXEC="/usr/bin/env python agent.py"
LOGFILE=/var/log/mongodb/mms-agent.log
depend() {
need net
use syslog
}
start() {
ebegin "Starting ${SVCNAME}"
checkpath -d -m 0755 -o root:root /var/run/
start-stop-daemon --start --chdir ${ROOTDIR} --exec ${EXEC} \
--pidfile "${PIDFILE}" --make-pidfile --background \
--user mongodb:mongodb --stdout ${LOGFILE} --stderr ${LOGFILE}
eend $?
}
stop() {
ebegin "Requesting ${SVCNAME} to stop"
start-stop-daemon --stop --pidfile "${PIDFILE}"
eend $?
}
|