summaryrefslogtreecommitdiff
path: root/net-misc/stargazer/files/sgauth
blob: 0dec60bfa1afed05be98c9bfca1e247e0c85bfe3 (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/openrc-run

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 $?
}