summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2013-02-18 08:25:51 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2013-02-18 08:25:51 +0000
commite510426ed9d910466624143ec588c5f3d2a28ce9 (patch)
treeaa67b95dbb7c82469dc2b7c89e67a7a9567ea258 /net-irc/anope/files
parentFix comment: iff = if and only if. (diff)
downloadgentoo-2-e510426ed9d910466624143ec588c5f3d2a28ce9.tar.gz
gentoo-2-e510426ed9d910466624143ec588c5f3d2a28ce9.tar.bz2
gentoo-2-e510426ed9d910466624143ec588c5f3d2a28ce9.zip
Fixing init script to ensure /run directory exists, fixing #448464
(Portage version: 2.2.0_alpha163/cvs/Linux i686, signed Manifest commit with key 15AE484C)
Diffstat (limited to 'net-irc/anope/files')
-rw-r--r--net-irc/anope/files/anope-init.d17
1 files changed, 9 insertions, 8 deletions
diff --git a/net-irc/anope/files/anope-init.d b/net-irc/anope/files/anope-init.d
index a7a529626dd5..66e6ecf11a8c 100644
--- a/net-irc/anope/files/anope-init.d
+++ b/net-irc/anope/files/anope-init.d
@@ -1,33 +1,34 @@
#!/sbin/runscript
-# Copyright 1999-2011 Gentoo Foundation
+# Copyright 1999-2013 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/files/anope-init.d,v 1.1 2011/12/28 20:25:48 gurligebis Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-irc/anope/files/anope-init.d,v 1.2 2013/02/18 08:25:51 gurligebis Exp $
+
+PIDFILE=/run/anope/services.pid
extra_started_commands="reload"
-depend() {
- use net mysql ircd
- provide irc-services
+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 /var/run/anope/services.pid \
+ --user ${ANOPE_USER} --pidfile ${PIDFILE} \
-- ${ANOPE_OPTS}
eend $?
}
stop() {
ebegin "Stopping Anope IRC Services"
- start-stop-daemon --stop --pidfile /var/run/anope/services.pid
+ start-stop-daemon --stop --pidfile ${PIDFILE}
eend $?
}
reload() {
ebegin "Reloading Anope IRC Services"
start-stop-daemon --signal USR2 --exec /usr/bin/services \
- --pidfile /var/run/anope/services.pid
+ --pidfile ${PIDFILE}
eend $?
}