summaryrefslogtreecommitdiffstats
path: root/testing/gross-svn/gross-svn.initd
diff options
context:
space:
mode:
authorCarlo Lanmdeter <clandmeter@gmail>2009-03-16 10:10:10 +0000
committerCarlo Lanmdeter <clandmeter@gmail>2009-03-16 10:10:10 +0000
commit6324e99c2889ebd4d919397d1d4d777ef7b3b8da (patch)
treeca0b016451713b28f19a6cfff7c6d8965a47c8b7 /testing/gross-svn/gross-svn.initd
parent8583a1f760a8e4617f85323b0ee73cfcfc4c4839 (diff)
downloadaports-6324e99c2889ebd4d919397d1d4d777ef7b3b8da.tar.bz2
aports-6324e99c2889ebd4d919397d1d4d777ef7b3b8da.tar.xz
testing/gross-svn: moved from extra to testing
Diffstat (limited to 'testing/gross-svn/gross-svn.initd')
-rw-r--r--testing/gross-svn/gross-svn.initd31
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 000000000..677d44997
--- /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 $?
+}
+