From: Charlie Root Date: Mon, 4 Apr 2016 16:51:01 +0000 (+0300) Subject: add rc.d script for freebsd X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=79fad83ca914df6d20c01cf872b7aee5f7a7a190;p=trinked.git add rc.d script for freebsd --- diff --git a/rc.d/trinketd b/rc.d/trinketd new file mode 100755 index 0000000..d21ba82 --- /dev/null +++ b/rc.d/trinketd @@ -0,0 +1,31 @@ +#!/bin/sh + +# PROVIDE: trinketd +# REQUIRE: DAEMON +# KEYWORD: shutdown + +# +# Add the following line to /etc/rc.conf to enable trinketd: +# +# trinketd_enable="YES" +# + +. /etc/rc.subr + +name=trinketd +rcvar=trinketd_enable + +logfile="/var/log/${name}.log" +pidfile="/var/run/${name}.pid" +dbdir="/var/db/trinket" +procname="/usr/local/sbin/trinketd" + +command="${procname}" +command_args=" -d -p ${pidfile} -P 300 -D ${dbdir} -l ${logfile} -w" + +load_rc_config $name + +trinketd_enable=${trinketd_enable:-"NO"} + +run_rc_command "$1" +