blob: 677d44997f845f8fdf8863e646b5cb12fe9e4757 (
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
|
#!/sbin/runscript
NAME=grossd
DAEMON=/usr/sbin/$NAME
depend() {
need net
}
check_config() {
if [ ! -e /var/db/gross/ ] ; then
einfo "Generating Gross database..."
install -dD -o${USER} -g${GROUP} /var/db/gross
${DAEMON} -Cf /etc/grossd.conf > /dev/null
fi
}
start() {
check_config || return 1
ebegin "Starting ${NAME}"
start-stop-daemon --start --quiet --background \
--exec ${DAEMON} -- ${OPTS}
eend $?
}
stop() {
ebegin "Stopping ${NAME}"
start-stop-daemon --stop --pidfile /var/run/grossd/grossd.pid
eend $?
}
|