diff options
author | Timo Teräs <timo.teras@iki.fi> | 2017-10-27 06:13:03 +0000 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2017-10-27 06:13:03 +0000 |
commit | 6b9c3abcfb02c003a0dfb20a68447b70954e3230 (patch) | |
tree | 3d2bbd2095ef90d8ca7316d96387d55160ddb5cb /community/gdnsd/gdnsd.initd | |
parent | eb26ddb58a52b62f0ca9024cf617cc21bbfc4961 (diff) | |
download | aports-6b9c3abcfb02c003a0dfb20a68447b70954e3230.tar.bz2 aports-6b9c3abcfb02c003a0dfb20a68447b70954e3230.tar.xz |
community/gdnsd: moved from main
Diffstat (limited to 'community/gdnsd/gdnsd.initd')
-rwxr-xr-x | community/gdnsd/gdnsd.initd | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/community/gdnsd/gdnsd.initd b/community/gdnsd/gdnsd.initd new file mode 100755 index 0000000000..e8a75e846b --- /dev/null +++ b/community/gdnsd/gdnsd.initd @@ -0,0 +1,53 @@ +#!/sbin/openrc-run + +name="gdnsd daemon" +extra_commands="configtest" +extra_started_commands="reload fastrestart" +description="Geographic Authoritative DNS server" +description_configtest="Run syntax tests for configuration files only." +description_reload="Signal running gdnsd to reload configuration files" +description_fastrestart="Optimized restart sequence (minimizes down time)" + +if [ -z "${GDNSD_CONFFILE}" ]; then + if [ "${SVCNAME}" = "gdnsd" ]; then + GDNSD_ROOT=system + else + GDNSD_ROOT=/var/gdnsd/${SVCNAME} + fi +fi + +depend() { + need net + use logger + after firewall + provide auth-dns +} + +act() { + ebegin "$1 ${SVCNAME}" + /usr/sbin/gdnsd -d ${GDNSD_ROOT} $2 + eend $? +} + +configtest() { + act "Checking configuration" checkconf +} + +start() { + act "Starting" start +} + +stop () { + if [ "${RC_CMD}" = "restart" ]; then + configtest || return 1 + fi + act "Stopping" stop +} + +fastrestart() { + act "Restarting" restart +} + +reload() { + act "Reloading" reload +} |