diff options
Diffstat (limited to 'security/sguil-server/files/sguild.in')
-rw-r--r-- | security/sguil-server/files/sguild.in | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/security/sguil-server/files/sguild.in b/security/sguil-server/files/sguild.in new file mode 100644 index 000000000000..10860b427017 --- /dev/null +++ b/security/sguil-server/files/sguild.in @@ -0,0 +1,51 @@ +#!/bin/sh + +# $FreeBSD$ + +# PROVIDE: sguild +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# Add the following lines to /etc/rc.conf to enable sguild: +# sguild_enable (bool): Set to YES to enable sguild +# Default: NO +# The following commandline arguments are available for sguild +# " -c <filename>: PATH to the sguild config (sguild.conf) file." +# " -a <filename>: PATH to the autocat config (autocat.conf) file." +# " -g <filename>: PATH to the sguild global queries (sguild.queries) file." +# " -u <filename>: PATH to the sguild users (sguild.users) file." +# " -P <filename>: Name of file to write the PID to." +# " Default is /var/run/%%SGUILDIR%%/sguild.pid" +# " -l <filepath>: PATH to sguild libraries." +# " -O <filename>: Define PATH to tls (tcl openssl) lib (libtls1.x.so)" +# " -C <directory>: Directory that contains sguild.pem and sguild.key" +# " -D Runs sguild in daemon mode." +# " -A <filename>: PATH to sguild.access file." +# " -d <0|1|2>: Set DEBUG level" +# sguild_flags (str): Extra flags passed to sguild +# Default: -D -P ${pid} +# sguild_conf (str): Sguild configuration file +# Default: %%PREFIX%%/etc/%%SGUILDIR%%/sguild.conf +# sguild_user (str): Default: sguild +# Note: this value MUST be set in /etc/rc.conf if you do not accept the default +# user created by the pkg-install script + +. /etc/rc.subr + +load_rc_config sguild +# set some defaults +sguild_enable=${sguild_enable:-"NO"} +sguild_conf=${sguild_conf:-"/%%PREFIX%%/etc/%%SGUILDIR%%/sguild.conf"} +pid=${pid:-"/var/run/%%SGUILDIR%%/sguild.pid"} +sguild_flags=${sguild_flags:-"-D -P ${pid}"} +sguild_user=${sguild_user:-"sguil"} + +name="sguild" +rcvar=sguild_enable +command="%%PREFIX%%/bin/${name}" +command_args="-c ${sguild_conf} ${sguild_flags}" +procname="%%TCLSH%%" +check_process="${procname}" +sguild_user="sguil" + +run_rc_command "$1" |