blob: e70a6ab01b3d2fa6360f7cfa6597448f03f9017a (
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
|
#!/sbin/openrc-run
depend() {
need net
}
checkconfig() {
if [ ! -f /etc/${SVCNAME}/${SVCNAME}.conf ] ; then
eerror "No /etc/${SVCNAME}/${SVCNAME}.conf file exists!"
fi
}
start() {
checkconfig || return 1
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start --exec /usr/sbin/${SVCNAME} --background --make-pidfile --pidfile /var/run/${SVCNAME}.pid -- --config-file /etc/${SVCNAME}/${SVCNAME}.conf
eend $?
}
stop() {
ebegin "Stopping ${SVCNAME}"
start-stop-daemon --stop --exec /usr/sbin/${SVCNAME} --pidfile /var/run/${SVCNAME}.pid
eend $?
}
|