#!/bin/sh # mynettcptable/files/mynettcptable.in 2022-05-13 09:04:03Z yo $ # # PROVIDE: mynettcptable # REQUIRE: DAEMON # KEYWORD: shutdown # # mynettcptable_enable (bool): Set to "YES" to enable mynettcptable. # (default: "NO") # # mynettcptable_config (str): Configuration file. # (default: "/usr/local/etc/mynettcptable.conf") # # mynettcptable_loglevel (str): Log level # (default: "warn") # # mynettcptable_logfile (str): MyNetTCPTable logfile # (default: "/var/log/mynettcptable.log") # . /etc/rc.subr name=mynettcptable rcvar=mynettcptable_enable load_rc_config $name : ${mynettcptable_enable="NO"} : ${mynettcptable_config="/usr/local/etc/mynettcptable.conf"} : ${mynettcptable_loglevel="warn"} : ${mynettcptable_user:="mynettcptable"} : ${mynettcptable_pidfile:="/var/run/mynettcptable.pid"} : ${mynettcptable_logfile="/var/log/mynettcptable.log"} command="/usr/local/bin/mynettcptable" command_args="-config=\${mynettcptable_config} -logLevel=\${mynettcptable_loglevel} -logLevel=\${mynettcptable_loglevel} > ${mynettcptable_logfile} 2>&1" start_cmd="/usr/sbin/daemon -u ${mynettcptable_user} ${command} ${command_args}" run_rc_command "$1"