mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
39 lines
823 B
Plaintext
39 lines
823 B
Plaintext
#!/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 $?
|
|
}
|