diff options
author | clement <clement@FreeBSD.org> | 2004-04-18 23:31:18 +0800 |
---|---|---|
committer | clement <clement@FreeBSD.org> | 2004-04-18 23:31:18 +0800 |
commit | 3bb97e9e1022f7b9f84d87129b4a0614ae0f5818 (patch) | |
tree | e9429b1f32f716e0b3e4a862c7a99d8504b47cdb /dns/maradns/files | |
parent | 3c0d8de7843e161bae5c1f84ada8d59990c965b7 (diff) | |
download | freebsd-ports-gnome-3bb97e9e1022f7b9f84d87129b4a0614ae0f5818.tar.gz freebsd-ports-gnome-3bb97e9e1022f7b9f84d87129b4a0614ae0f5818.tar.zst freebsd-ports-gnome-3bb97e9e1022f7b9f84d87129b4a0614ae0f5818.zip |
- Make dns/maradns startup script use rc.subr(8).
- Provide additional startup script for zoneserver(8) program
needed to run an authorative primary nameserver.
- Both these scripts pipe programs' output into logger(1) so
that maradns logs into syslog.
- Installs an example zonefile in maradns (csv1) format.
PR: 65624
Submitted by: Alex Kapranoff <kappa@vvs01.agava.net>
Diffstat (limited to 'dns/maradns/files')
-rw-r--r-- | dns/maradns/files/maradns.sh.sample | 23 | ||||
-rw-r--r-- | dns/maradns/files/rc_d.sh | 38 |
2 files changed, 38 insertions, 23 deletions
diff --git a/dns/maradns/files/maradns.sh.sample b/dns/maradns/files/maradns.sh.sample deleted file mode 100644 index 5c640294479c..000000000000 --- a/dns/maradns/files/maradns.sh.sample +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh - -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -case "$1" in -start) - if [ -x ${PREFIX}/sbin/maradns ]; then - ${PREFIX}/sbin/maradns > /var/log/maradns.log & - echo -n ' maradns' - fi; - ;; -stop) - killall maradns && echo -n ' maradns' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 diff --git a/dns/maradns/files/rc_d.sh b/dns/maradns/files/rc_d.sh new file mode 100644 index 000000000000..c95712c78424 --- /dev/null +++ b/dns/maradns/files/rc_d.sh @@ -0,0 +1,38 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: %%SERVICE%% +# REQUIRE: SERVERS +# BEFORE: DAEMON +# KEYWORD: FreeBSD shutdown +# +# NOTE for FreeBSD 5.0+: +# If you want this script to start with the base rc scripts +# move %%SERVICE%%.sh to /etc/rc.d/%%SERVICE%% + +prefix=%%PREFIX%% + +# Define these %%SERVICE%%_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/%%SERVICE%% +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +%%SERVICE%%_enable=${%%SERVICE%%_enable:-"NO"} +%%SERVICE%%_flags=${%%SERVICE%%_flags:-""} # Can be "-f /path/alternate_rc" + +. %%RC_SUBR%% + +name="%%SERVICE%%" +rcvar=`set_rcvar` +command="${prefix}/sbin/${name}" +command_args="| /usr/bin/logger -p daemon.notice -t %%SERVICE%% &" + +load_rc_config $name + +flags="${%%SERVICE%%_flags}" + +run_rc_command "$1" |