diff options
author | dougb <dougb@FreeBSD.org> | 2009-07-16 00:39:21 +0800 |
---|---|---|
committer | dougb <dougb@FreeBSD.org> | 2009-07-16 00:39:21 +0800 |
commit | 3abd945e29ab28612a6613e268d8d7b13e4e18fb (patch) | |
tree | b8b8b8afdc04f4e0ac8e5b636cdd87a9936933ea /net/howl | |
parent | 7cc4e9458d3ddc05577cb824e7e34cc8328f7c1d (diff) | |
download | freebsd-ports-gnome-3abd945e29ab28612a6613e268d8d7b13e4e18fb.tar.gz freebsd-ports-gnome-3abd945e29ab28612a6613e268d8d7b13e4e18fb.tar.zst freebsd-ports-gnome-3abd945e29ab28612a6613e268d8d7b13e4e18fb.zip |
Overhaul this script to better fit the rc.d way of doing things;
1. Add a comment telling the user what to put into rc.conf
2. Instead of specifying start and stop commands, simply define command=
3. Move the default _enable assignment to after load_rc_config() and
remove the empty _flags assignment.
Diffstat (limited to 'net/howl')
-rw-r--r-- | net/howl/files/mdnsresponder.in | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/net/howl/files/mdnsresponder.in b/net/howl/files/mdnsresponder.in index f0ad7b25a12b..80f1662ee300 100644 --- a/net/howl/files/mdnsresponder.in +++ b/net/howl/files/mdnsresponder.in @@ -6,28 +6,20 @@ # REQUIRE: DAEMON # # Howl's mDNSResponder, a Zeroconf (Bonjour) service advertisement daemon. -# -mdnsresponder_enable=${mdnsresponder_enable-"NO"} -mdnsresponder_flags=${mdnsresponder_flags-""} +# Add the following lines to /etc/rc.conf to enable mdnsresponder: +# mdnsresponder_enable="YES" +# mdnsresponder_flags="<set as needed>" . %%RC_SUBR%% name=mdnsresponder rcvar=`set_rcvar` -start_cmd=mdnsresponder_start -stop_cmd=mdnsresponder_stop +command=%%PREFIX%%/bin/mDNSResponder -mdnsresponder_start() { - checkyesno mdnsresponder_enable && echo "Starting mDNSResponder." && \ - %%PREFIX%%/bin/mDNSResponder ${mdnsresponder_flags} -} +load_rc_config ${name} -mdnsresponder_stop() { - checkyesno mdnsresponder_enable && echo "Stopping mDNSResponder." && \ - killall mDNSResponder -} +mdnsresponder_enable=${mdnsresponder_enable-"NO"} -load_rc_config ${name} run_rc_command "$1" |