From cd07978c0dfb26a03ec72738e49b9959defdd100 Mon Sep 17 00:00:00 2001 From: sumikawa Date: Tue, 4 May 2004 10:44:05 +0000 Subject: rcNG-fy. Submitted by: nork --- www/wwwoffle/files/wwwoffled.sh | 44 ++++++++++++++++++++++++++++------------- 1 file changed, 30 insertions(+), 14 deletions(-) (limited to 'www/wwwoffle/files') diff --git a/www/wwwoffle/files/wwwoffled.sh b/www/wwwoffle/files/wwwoffled.sh index f57aef7bc533..7fb48f567080 100644 --- a/www/wwwoffle/files/wwwoffled.sh +++ b/www/wwwoffle/files/wwwoffled.sh @@ -1,17 +1,33 @@ #!/bin/sh +# $FreeBSD$ -case $1 in -start) - [ -x %PREFIX%/sbin/wwwoffled ] && \ - %PREFIX%/sbin/wwwoffled >/dev/null 2>&1 && echo -n ' wwwoffled' - ;; -stop) - killall wwwoffled && echo -n ' wwwoffled' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - exit 64 - ;; -esac +# PROVIDE: wwwoffled +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: FreeBSD shutdown -exit 0 +# Define these wwwoffled_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/wwwoffled +# +# DO NOT CHANGE THESE DEFAULT VALUES HERE +# +wwwoffled_enable="NO" +wwwoffled_flags="" +wwwoffled_pidfile="/var/run/wwwoffled.pid" +wwwoffled_conffile="%%PREFIX%%/etc/wwwoffle.conf" + +. %%RC_SUBR%% + +name="wwwoffled" +rcvar=`set_rcvar` +command="%%PREFIX%%/sbin/wwwoffled" + +load_rc_config $name + +pidfile="${wwwoffled_pidfile}" +command_args="-p > ${pidfile} 2> /dev/null" +required_files="${wwwoffled_conffile}" + +run_rc_command "$1" -- cgit