aboutsummaryrefslogtreecommitdiffstats
path: root/community/yadifa/yadifa.initd
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2016-08-23 07:10:33 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2016-08-23 07:10:33 +0000
commitd9a08d67caee43455e4ffca3db6349c50b234690 (patch)
tree1944d2e729feb06aba74945737f7c83379ecbbfd /community/yadifa/yadifa.initd
parent1d31e92ddaeed64b748cb43860b41e4a7016b0f8 (diff)
downloadaports-d9a08d67caee43455e4ffca3db6349c50b234690.tar.bz2
aports-d9a08d67caee43455e4ffca3db6349c50b234690.tar.xz
community/yadifa: moved from testing
Diffstat (limited to 'community/yadifa/yadifa.initd')
-rw-r--r--community/yadifa/yadifa.initd38
1 files changed, 38 insertions, 0 deletions
diff --git a/community/yadifa/yadifa.initd b/community/yadifa/yadifa.initd
new file mode 100644
index 0000000000..5b9cf898b8
--- /dev/null
+++ b/community/yadifa/yadifa.initd
@@ -0,0 +1,38 @@
+#!/sbin/openrc-run
+# Copyright 2014 Francesco Colista (fcolista@alpinelinux.org)
+# 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}"
+ start-stop-daemon --start --exec ${SVCBIN} \
+ --pidfile ${PIDFILE} \
+ -- -c ${CONFFILE} ${YADIFA_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --exec ${SVCBIN} \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --stop --oknodo --signal HUP \
+ --exec ${SVCBIN} --pidfile ${PIDFILE}
+ eend $?
+}