summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-irc/anope/files/anope-init.d')
-rw-r--r--net-irc/anope/files/anope-init.d34
1 files changed, 34 insertions, 0 deletions
diff --git a/net-irc/anope/files/anope-init.d b/net-irc/anope/files/anope-init.d
new file mode 100644
index 000000000000..6523007e93e5
--- /dev/null
+++ b/net-irc/anope/files/anope-init.d
@@ -0,0 +1,34 @@
+#!/sbin/runscript
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+PIDFILE=/run/anope/services.pid
+
+extra_started_commands="reload"
+
+start_pre() {
+ checkpath -o ${ANOPE_USER} -d "$(dirname $PIDFILE)"
+}
+
+start() {
+ ebegin "Starting Anope IRC Services"
+ start-stop-daemon --start --exec /usr/bin/services \
+ --user ${ANOPE_USER} --pidfile ${PIDFILE} \
+ -- ${ANOPE_OPTS}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Anope IRC Services"
+ start-stop-daemon --stop --pidfile ${PIDFILE}
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading Anope IRC Services"
+ start-stop-daemon --signal USR2 --exec /usr/bin/services \
+ --pidfile ${PIDFILE}
+ eend $?
+}
+