From a7234809ff42b5f17b1b5143de43b28d8df2ebf0 Mon Sep 17 00:00:00 2001 From: Nathan Phillip Brink Date: Wed, 20 Jul 2011 02:24:21 +0000 Subject: Fix initial permissions of /var/run/atheme and remove bad prefix-support logic from init script. Reported by the_mgt/ich. (Portage version: 2.2.0_alpha41-r1/cvs/Linux x86_64) --- .../atheme-services/files/atheme-services.initd | 37 ++++++++++++++++++ .../atheme-services/files/atheme-services.initd.in | 45 ---------------------- 2 files changed, 37 insertions(+), 45 deletions(-) create mode 100644 net-irc/atheme-services/files/atheme-services.initd delete mode 100644 net-irc/atheme-services/files/atheme-services.initd.in (limited to 'net-irc/atheme-services/files') 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..7d643533ef1a --- /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 +# $Header: /var/cvsroot/gentoo-x86/net-irc/atheme-services/files/atheme-services.initd,v 1.1 2011/07/20 02:24:17 binki Exp $ + +opts="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 --chuid 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 $? +} diff --git a/net-irc/atheme-services/files/atheme-services.initd.in b/net-irc/atheme-services/files/atheme-services.initd.in deleted file mode 100644 index b4ab6dba1f04..000000000000 --- a/net-irc/atheme-services/files/atheme-services.initd.in +++ /dev/null @@ -1,45 +0,0 @@ -#!/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 $? -} -- cgit v1.2.3-65-gdbad