summaryrefslogtreecommitdiff
blob: 130b525935d3798f43a34564e0e8cfed96934cec (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
#!/sbin/runscript

DAEMON=/usr/sbin/sgauth
SGAUTH_OPTS="/etc/stargazer/sgauth.conf"
PIDFILE="/run/sgauth.pid"

depend() {
	need net
	provide sgauth
}

start() {
	ebegin "Starting sgauth"
	start-stop-daemon --start --quiet --pidfile ${PIDFILE} --exec ${DAEMON} -- ${SGAUTH_OPTS}
	eend $?
}

start_post() {
	pgrep -n $RC_SVCNAME > ${PIDFILE}
}

stop() {
	ebegin "Stopping sgauth"
	start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
	rm -f ${PIDFILE}
	eend $?
}