summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-irc/atheme-services/files/atheme-services.initd')
-rw-r--r--net-irc/atheme-services/files/atheme-services.initd37
1 files changed, 37 insertions, 0 deletions
diff --git a/net-irc/atheme-services/files/atheme-services.initd b/net-irc/atheme-services/files/atheme-services.initd
new file mode 100644
index 000000000000..53996f386385
--- /dev/null
+++ b/net-irc/atheme-services/files/atheme-services.initd
@@ -0,0 +1,37 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+extra_started_commands="reload"
+
+depend() {
+ need net
+ use ircd
+ provide irc-services
+}
+
+start() {
+ ATHEME_SERVICES_RUNDIR=/var/run/atheme
+ if ! [ -d "${ATHEME_SERVICES_RUNDIR}" ]; then
+ ebegin "Creating \`${ATHEME_SERVICES_RUNDIR}'"
+ install -o atheme-services -d "${ATHEME_SERVICES_RUNDIR}"
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+ start-stop-daemon --start --pidfile=/var/run/atheme/atheme.pid --user atheme-services --exec /usr/bin/atheme-services
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile /var/run/atheme/atheme.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile /var/run/atheme/atheme.pid
+ eend $?
+}