diff options
Diffstat (limited to 'testing/gross-svn/gross-svn.initd')
-rw-r--r-- | testing/gross-svn/gross-svn.initd | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/gross-svn/gross-svn.initd b/testing/gross-svn/gross-svn.initd new file mode 100644 index 0000000000..677d44997f --- /dev/null +++ b/testing/gross-svn/gross-svn.initd @@ -0,0 +1,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 $? +} + |