freebsd-ports/irc/ratbox-services/files/ratbox-services.in
Doug Barton 9aac569eaa Move the rc.d scripts of the form *.sh.in to *.in
Where necessary add $FreeBSD$ to the file

No PORTREVISION bump necessary because this is a no-op
2012-08-05 23:19:36 +00:00

37 lines
678 B
Bash

#!/bin/sh
# $FreeBSD$
#
# PROVIDE: ratbox-services
# REQUIRE: DAEMON
# BEFORE: LOGIN
. /etc/rc.subr
name="ratbox_services"
rcvar=ratbox_services_enable
load_rc_config $name
ratbox_services_enable=${ratbox_services_enable:-"NO"}
ratbox_services_user=${ratbox_services_user:-"ircservices"}
ratbox_services_group=${ratbox_services_group:-"ircservices"}
command="%%PREFIX%%/sbin/ratbox-services"
pidfile=%%RUNDIR%%/ratbox-services.pid
required_files="%%PREFIX%%/etc/ratbox-services.conf"
start_precmd=prestart
stop_precmd=prestop
prestart()
{
touch $pidfile
chown $ratbox_services_user:$ratbox_services_group $pidfile
}
prestop()
{
rm -f $pidfile
}
run_rc_command "$1"