summaryrefslogtreecommitdiff
path: root/irc/ratbox-services/files/ratbox-services.sh.in
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-05-01 12:45:14 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-05-01 12:45:14 +0000
commitb873fc159ab9ef5cace8a31e25945ddabbb726bf (patch)
treea3f8f3b276471b6778c2f2488e261a2da1160f91 /irc/ratbox-services/files/ratbox-services.sh.in
parent- Update to 0.5.1 (diff)
ratbox-services is a services package written mostly from scratch for
use with ircd-ratbox. It is highly configurable, with nearly all options being set in a config that can be rehashed rather than set at compile time. It also uses the SQLite database backend, which works as a database interface to a normal file, meaning no seperate database software must be running. Features: - User, nick and channel services - Jupe service - Global message service - Oper services - Opered bot - List service WWW: http://services.ircd-ratbox.org/ PR: ports/92520 Submitted by: Shaun Amott <shaun@inerd.com>
Notes
Notes: svn path=/head/; revision=161043
Diffstat (limited to 'irc/ratbox-services/files/ratbox-services.sh.in')
-rw-r--r--irc/ratbox-services/files/ratbox-services.sh.in35
1 files changed, 35 insertions, 0 deletions
diff --git a/irc/ratbox-services/files/ratbox-services.sh.in b/irc/ratbox-services/files/ratbox-services.sh.in
new file mode 100644
index 000000000000..321384a3d0f8
--- /dev/null
+++ b/irc/ratbox-services/files/ratbox-services.sh.in
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# PROVIDE: ratbox-services
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+
+. %%RC_SUBR%%
+
+name="ratbox_services"
+rcvar=`set_rcvar`
+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"