diff options
Diffstat (limited to 'irc/ratbox-services/files/ratbox-services.in')
-rw-r--r-- | irc/ratbox-services/files/ratbox-services.in | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/irc/ratbox-services/files/ratbox-services.in b/irc/ratbox-services/files/ratbox-services.in new file mode 100644 index 000000000000..1ab25706fb13 --- /dev/null +++ b/irc/ratbox-services/files/ratbox-services.in @@ -0,0 +1,37 @@ +#!/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" |