diff --git a/files/mynettcptable.in b/files/mynettcptable.in index 14a4bcd..7668228 100644 --- a/files/mynettcptable.in +++ b/files/mynettcptable.in @@ -24,7 +24,7 @@ name=mynettcptable rcvar=mynettcptable_enable -load_rc_config $name +load_rc_config ${name} : ${mynettcptable_enable="NO"} : ${mynettcptable_config="/usr/local/etc/mynettcptable.conf"} @@ -32,12 +32,13 @@ load_rc_config $name : ${mynettcptable_user:="nobody"} : ${mynettcptable_logfile="/var/log/mynettcptable.log"} +command="/usr/local/bin/${name}" pidfile="/var/run/${name}/${name}.pid" -mynettcptable_command="/usr/local/bin/mynettcptable" +command_args="-pidfile=${pidfile} -config=${mynettcptable_config} -logLevel=${mynettcptable_loglevel}" start_precmd="mynettcptable_prestart" -command="/usr/sbin/daemon" -command_args="-P ${pidfile} -u ${mynettcptable_user} -r -f ${mynettcptable_command} -config=${mynettcptable_config} -logLevel=${mynettcptable_loglevel} -logLevel=${mynettcptable_loglevel} >> ${mynettcptable_logfile} 2>&1" + +start_cmd="/usr/sbin/daemon -u ${mynettcptable_user} ${command} ${command_args} >> ${mynettcptable_logfile} 2>&1" mynettcptable_prestart() {