summaryrefslogtreecommitdiff
blob: 006c275bcc788351797e7ccfb0ad28abe6129404 (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
32
33
#!/sbin/runscript
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

sbdproxy_bin="/usr/bin/sbd-proxy.pl"
sbdproxy_pidfile="/var/run/${SVCNAME}.pid"
#sbdproxy_uid: can be set in /etc/conf.d/${SVCNAME}
#sbdproxy_gid: can be set in /etc/conf.d/${SVCNAME}
#sbdproxy_opts: can be set in /etc/conf.d/${SVCNAME}

depend() {
	need net
	use mta
}

start() {
	ebegin "Starting ${SVCNAME}"
	start-stop-daemon --start --quiet \
		--chuid "${sbdproxy_uid:-sbd}:${sbdproxy_gid:-sbd}" \
		--exec "${sbdproxy_bin}" \
		--background \
		--pidfile "${sbdproxy_pidfile}" \
		--make-pidfile \
		-- ${sbdproxy_opts}
	eend ${?}
}

stop() {
	ebegin "Stopping ${SVCNAME}"
	start-stop-daemon --stop --quiet --pidfile "${sbdproxy_pidfile}"
	eend ${?}
}