#!/bin/sh # $FreeBSD: head/www/www6to4/files/www6to4.in 340872 2014-01-24 00:14:07Z mat $ # # PROVIDE: www6to4 # REQUIRE: DAEMON # # Add the following to /etc/rc.conf[.local] to enable this service # # www6to4_enable="YES" # . /etc/rc.subr name=www6to4 rcvar=www6to4_enable 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"