diff options
author | Francesco Colista <fcolista@alpinelinux.org> | 2014-10-22 13:07:17 +0000 |
---|---|---|
committer | Francesco Colista <fcolista@alpinelinux.org> | 2014-10-22 13:07:25 +0000 |
commit | a97b99feceb836178d0a333f94699c94bcce1549 (patch) | |
tree | 289f1aebb821dcfdfd47e2e211eed9bfd6fa2756 /testing/yadifa/yadifa.initd | |
parent | 0072d1d51e0b6f7368da3b198d6ebdab29b94461 (diff) | |
download | aports-a97b99feceb836178d0a333f94699c94bcce1549.tar.bz2 aports-a97b99feceb836178d0a333f94699c94bcce1549.tar.xz |
testing/yadifa: feature #3443
Diffstat (limited to 'testing/yadifa/yadifa.initd')
-rw-r--r-- | testing/yadifa/yadifa.initd | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/testing/yadifa/yadifa.initd b/testing/yadifa/yadifa.initd new file mode 100644 index 0000000000..228e4af109 --- /dev/null +++ b/testing/yadifa/yadifa.initd @@ -0,0 +1,43 @@ +#!/sbin/runscript +# Copyright 2014 Francesco Colista (francesco.colista@gmail.com) +# Distributed under the terms of the GNU General Public License, v2 or later# + +depend() { + need net + after firewall + provide dns +} + + +checkconfig() { + if [ ! -f "${CONFFILE}" ]; then + eerror "${CONFFILE} does not exist!" + return 1 + fi +} + +start() { + ebegin "Starting ${SVCNAME}" + ulimit -c unlimited + start-stop-daemon --start --exec ${SVCBIN} \ + --pidfile ${PIDFILE} \ + -- -c ${CONFFILE} ${YADIFA_OPTS} + eend $? +} + + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --start --exec ${SVCBIN} \ + --pidfile ${PIDFILE} \ + eend $? +} + + + +reload() { + ebegin "Reloading ${SVCNAME}" + start-stop-daemon --stop --oknodo --signal HUP \ + --exec ${SVCBIN} --pidfile ${PIDFILE} + eend $? +} |