1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-02-08 12:01:56 +00:00
Martin Wilke f02dcc204a - Use rc.subr style
- Make portlint happy
- Bump PORTREVISION

PR:		112246
Submitted by:	NAKAJI Hiroyuki <nakaji@jp.freebsd.org>
Approved by:	maintainer
2007-05-03 08:28:13 +00:00

38 lines
796 B
Bash

#!/bin/sh
# $FreeBSD$
#
# 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"