summaryrefslogtreecommitdiff
blob: 76d58aca1c7b45641c39c51f7777a3f91a1cd03d (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
#!/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
}