3 # $FreeBSD: ports/net/stone/files/stone.in,v 1.2 2012/11/17 06:00:22 svnexp Exp $
10 # Add the following line to /etc/rc.conf to enable stone:
11 # stone_enable (bool): Set it to "YES" to enable stone.
13 # Add at least one of the followings to /etc/rc.conf to give rules to stone:
14 # stone_flags (str): See stone(1).
15 # Default: "" (-D will be added automatically)
16 # stone_conffile (str): Stone config file
24 command="%%PREFIX%%/bin/stone"
25 start_precmd="stone_precmd"
26 restart_precmd="stone_precmd"
28 stone_enable=${stone_enable:-"NO"}
34 if [ -z "${stone_flags}" -a -z "${stone_conffile}" ]; then
35 warn "set at least stone_flags or stone_conffile."
39 # doesn't use required_files because stone accepts only one conffile
40 if [ -n "${stone_conffile}" ]; then
41 if [ ! -r "${stone_conffile}" ]; then
42 warn "${stone_conffile} is not readable."
43 if [ -n "$stone_conffile" -a -n "$rc_force" ]; then
44 warn "start without ${stone_conffile} anyway."
49 rc_flags="-C ${stone_conffile} ${rc_flags}"
53 # make sure daemonize option will be given
54 rc_flags="-D ${rc_flags}"