summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathan Phillip Brink <binki@gentoo.org>2011-06-09 04:38:07 +0000
committerNathan Phillip Brink <binki@gentoo.org>2011-06-09 04:38:07 +0000
commit80b263a59141ee9c03a60ce93d9c01adc8ddf121 (patch)
treef851e74c08522501c8bfee1d2ac173629ed1de62 /net-irc/atheme-services/files
parentAdd ~alpha. (diff)
downloadgentoo-2-80b263a59141ee9c03a60ce93d9c01adc8ddf121.tar.gz
gentoo-2-80b263a59141ee9c03a60ce93d9c01adc8ddf121.tar.bz2
gentoo-2-80b263a59141ee9c03a60ce93d9c01adc8ddf121.zip
Completely reworked for bump to atheme-services-6.0.8, fixing bug #305411.
(Portage version: 2.2.0_alpha37-r1/cvs/Linux x86_64)
Diffstat (limited to 'net-irc/atheme-services/files')
-rw-r--r--net-irc/atheme-services/files/atheme-services.initd.in45
1 files changed, 45 insertions, 0 deletions
diff --git a/net-irc/atheme-services/files/atheme-services.initd.in b/net-irc/atheme-services/files/atheme-services.initd.in
new file mode 100644
index 000000000000..b4ab6dba1f04
--- /dev/null
+++ b/net-irc/atheme-services/files/atheme-services.initd.in
@@ -0,0 +1,45 @@
+#!/sbin/runscript
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/atheme-services/files/atheme-services.initd.in,v 1.1 2011/06/09 04:38:07 binki Exp $
+
+opts="reload"
+
+depend() {
+ need net
+ use ircd
+ provide irc-services
+}
+
+start() {
+ ATHEME_SERVICES_RUNDIR="@GENTOO_PORTAGE_EPREFIX@"/var/run/atheme
+ if ! [ -d "${ATHEME_SERVICES_RUNDIR}" ]; then
+ ebegin "Creating \`${ATHEME_SERVICES_RUNDIR}'"
+
+ ATHEME_INSTALL_O="-o atheme-services"
+ [ "@GENTOO_PORTAGE_EPREFIX@" ] && ATHEME_INSTALL_O=
+
+ install ${ATHEME_INSTALL_O} -d "${ATHEME_SERVICES_RUNDIR}"
+ eend $?
+ fi
+
+ ebegin "Starting ${SVCNAME}"
+
+ ATHEME_SSD_CHUID="--chuid atheme-services"
+ [ "@GENTOO_PORTAGE_EPREFIX@" ] && ATHEME_SSD_CHUID=
+
+ start-stop-daemon --start ${ATHEME_SSD_CHUID} --exec "@GENTOO_PORTAGE_EPREFIX@"/usr/bin/atheme-services
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ${SVCNAME}"
+ start-stop-daemon --signal HUP --pidfile "@GENTOO_PORTAGE_EPREFIX@"/var/run/atheme/atheme.pid
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ${SVCNAME}"
+ start-stop-daemon --stop --quiet --pidfile "@GENTOO_PORTAGE_EPREFIX@"/var/run/atheme/atheme.pid
+ eend $?
+}