diff options
Diffstat (limited to 'www/c-icap/files/c-icap.in')
-rw-r--r-- | www/c-icap/files/c-icap.in | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/www/c-icap/files/c-icap.in b/www/c-icap/files/c-icap.in new file mode 100644 index 000000000000..45091b901100 --- /dev/null +++ b/www/c-icap/files/c-icap.in @@ -0,0 +1,44 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: c-icap +# REQUIRE: DAEMON cleanvar +# BEFORE: LOGIN + +# +# Add the following lines to /etc/rc.conf to enable c-icap: +# +# c_icap_enable="YES" +# c_icap_flags="<set as needed>" +# +# See '%%PREFIX%%/bin/c-icap --help' for flags +# + +. /etc/rc.subr + +name=c_icap +rcvar=c_icap_enable + +command="%%PREFIX%%/bin/c-icap" + +stop_postcmd="rm -f $pidfile" + +# read settings, set default values +load_rc_config "$name" +: ${c_icap_enable="NO"} +: ${c_icap_conf="%%PREFIX%%/etc/c-icap.conf"} +: ${c_icap_pidfile="%%RUN_DIR%%/c-icap.pid"} +: ${c_icap_user="%%CICAP_USER%%"} + +pidfile="${c_icap_pidfile}" +required_files="${c_icap_conf}" +command_args="-f ${c_icap_conf}" +stop_postcmd=stop_postcmd + +stop_postcmd() { + rm -f %%RUN_DIR%%/c-icap.ctl +} + +run_rc_command "$1" |