#!/bin/sh # $FreeBSD: head/security/razorback-masterNugget/files/masterNugget.in 340872 2014-01-24 00:14:07Z mat $ # # PROVIDE: masterNugget # REQUIRE: dispatcher clamd # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable the razorback master nugget: # # masterNugget_enable="YES" . /etc/rc.subr name=masterNugget rcvar=masterNugget_enable load_rc_config $name masterNugget_enable=${masterNugget_enable:-"NO"} masterNugget_user=${masterNugget_user:-"razorback"} masterNugget_group=${masterNugget_group:-"razorback"} command=%%PREFIX%%/bin/masterNugget start_precmd="masterNugget_precmd" _piddir=/var/run/razorback pidfile=${_piddir}/masterNugget.pid masterNugget_precmd() { export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:%%PREFIX%%/bin:%%PREFIX%%/sbin install -d -o $masterNugget_user -g $masterNugget_user -m 755 $_piddir cd /var/lib/razorback export HOME=/var/lib/razorback } run_rc_command "$1"