diff options
author | Doug Barton <dougb@FreeBSD.org> | 2012-08-05 23:19:36 +0000 |
---|---|---|
committer | Doug Barton <dougb@FreeBSD.org> | 2012-08-05 23:19:36 +0000 |
commit | 9aac569eaa031e27191a3f4165b389a17f467ad2 (patch) | |
tree | 1ed78841e1757014ccc09581c61c3683992d3f77 /net/ris/files/binlsrv.in | |
parent | 47b836bfe5c397deb173a868525d4cba22cbb5fa (diff) | |
download | ports-9aac569eaa031e27191a3f4165b389a17f467ad2.tar.gz ports-9aac569eaa031e27191a3f4165b389a17f467ad2.zip |
Notes
Diffstat (limited to 'net/ris/files/binlsrv.in')
-rw-r--r-- | net/ris/files/binlsrv.in | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/net/ris/files/binlsrv.in b/net/ris/files/binlsrv.in new file mode 100644 index 000000000000..14a76e7b1df6 --- /dev/null +++ b/net/ris/files/binlsrv.in @@ -0,0 +1,44 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: binlsrv +# REQUIRE: DAEMON +# BEFORE: LOGIN +# KEYWORD: shutdown +# +# Add the following lines to /etc/rc.conf to enable binlsrv: +# +# binlsrv_enable="YES" +# binlsrv_infdir="/path/to/inf/files" + +. /etc/rc.subr + +name="binlsrv" +rcvar=binlsrv_enable + +load_rc_config "${name}" + +# Set defaults +: ${binlsrv_enable:="NO"} +: ${binlsrv_infdir:="%%DATADIR%%/inf"} + +pidfile="%%PID_FILE%%" +command="%%PYTHON_CMD%%" +command_args="%%DATADIR%%/${name}.py -d" +required_dirs="$binlsrv_infdir" + +start_precmd="binlsrv_start_precmd" +stop_postcmd="binlsrv_stop_postcmd" + +binlsrv_start_precmd() +{ + %%DATADIR%%/infparser.py ${binlsrv_infdir} +} + +binlsrv_stop_postcmd() +{ + rm -f ${pidfile} +} + +run_rc_command "$1" |