#!/bin/sh # $FreeBSD: ports/www/www6to4/files/www6to4.in,v 1.1 2007/05/03 08:28:13 miwi Exp $ # # PROVIDE: www6to4 # REQUIRE: DAEMON # # Add the following to /etc/rc.conf[.local] to enable this service # # www6to4_enable="YES" # . %%RC_SUBR%% name=www6to4 rcvar=`set_rcvar` command=%%PREFIX%%/sbin/www6to4 WWW6TO4DIR=%%PREFIX%%/etc/www6to4 www6to4_enable=${www6to4_enable:-"NO"} www6to4_config=${www6to4_config:-"${WWW6TO4DIR}/www6to4.conf"} www6to4_flags=${www6to4_flags:-"-c ${www6to4_config}"} www6to4_user=${www6to4_user:-"nobody"} www6to4_chdir=${WWW6TO4DIR} required_files=${www6to4_config} required_dirs=${WWW6TO4DIR} start_cmd=www6to4_start www6to4_start() { checkyesno www6to4_enable && echo "Starting ${name}." && \ chdir ${www6to4_chdir} && su -m ${www6to4_user} -c "$command ${www6to4_flags} &" } load_rc_config ${name} run_rc_command "$1"