aboutsummaryrefslogtreecommitdiffstats
path: root/testing/yadifa/yadifa.initd
diff options
context:
space:
mode:
Diffstat (limited to 'testing/yadifa/yadifa.initd')
-rw-r--r--testing/yadifa/yadifa.initd43
1 files changed, 43 insertions, 0 deletions
diff --git a/testing/yadifa/yadifa.initd b/testing/yadifa/yadifa.initd
new file mode 100644
index 000000000..228e4af10
--- /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 $?
+}