From 79fad83ca914df6d20c01cf872b7aee5f7a7a190 Mon Sep 17 00:00:00 2001 From: Charlie Root Date: Mon, 4 Apr 2016 19:51:01 +0300 Subject: [PATCH] add rc.d script for freebsd --- rc.d/trinketd | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100755 rc.d/trinketd 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" + -- 2.46.1