sysutils/mfid: Improve rc script

Now you can use mfid_flags in rc.conf to control other daemon flags
This commit is contained in:
Mark Felder 2016-06-13 15:46:41 +00:00
parent 0789531c19
commit 720f9c33c1
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=416848
2 changed files with 5 additions and 11 deletions

View file

@ -2,7 +2,7 @@
# $FreeBSD$
PORTNAME= mfid
PORTVERSION= 0.03
PORTVERSION= 0.04
CATEGORIES= sysutils
MASTER_SITES= LOCAL/feld

View file

@ -12,16 +12,10 @@ name=mfid
rcvar=mfid_enable
load_rc_config $name
raid_alert_mailto=${mfid_alert_mailto:-"root@localhost"}
start_cmd=mfid_start
stop_cmd="killall -9 mfid > /dev/null 2>&1"
required_files=/dev/mfi0
mfid_start()
{
if [ -x "%%PREFIX%%/sbin/mfid" -a -e "/dev/mfi0" ]; then
echo "Starting mfid."
%%PREFIX%%/sbin/mfid ${raid_alert_mailto}
fi
}
raid_alert_mailto=${mfid_alert_mailto:-"root@localhost"}
command=%%PREFIX%%/sbin/mfid
command_args=${raid_alert_mailto}
run_rc_command "$1"