diff options
author | Maciej Mrozowski <reavertm@gentoo.org> | 2010-07-03 10:30:55 +0000 |
---|---|---|
committer | Maciej Mrozowski <reavertm@gentoo.org> | 2010-07-03 10:30:55 +0000 |
commit | 7c9f0f0b127c8e7ef9dc943fd30ace80bb9eba71 (patch) | |
tree | 642e4b720093e9104165f9d1c75c27d5bfe0018d /net-irc/quassel | |
parent | Convert to ruby-ng. (diff) | |
download | gentoo-2-7c9f0f0b127c8e7ef9dc943fd30ace80bb9eba71.tar.gz gentoo-2-7c9f0f0b127c8e7ef9dc943fd30ace80bb9eba71.tar.bz2 gentoo-2-7c9f0f0b127c8e7ef9dc943fd30ace80bb9eba71.zip |
Fix init.d file (-R for recursive chown), quote some variables, specify which files to move migration.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'net-irc/quassel')
-rw-r--r-- | net-irc/quassel/files/quasselcore.init | 39 | ||||
-rw-r--r-- | net-irc/quassel/quassel-9999.ebuild | 4 |
2 files changed, 24 insertions, 19 deletions
diff --git a/net-irc/quassel/files/quasselcore.init b/net-irc/quassel/files/quasselcore.init index 8dacba7c7356..57d79ccf96c1 100644 --- a/net-irc/quassel/files/quasselcore.init +++ b/net-irc/quassel/files/quasselcore.init @@ -1,7 +1,7 @@ #!/sbin/runscript # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore.init,v 1.5 2010/07/01 10:34:03 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore.init,v 1.6 2010/07/03 10:30:55 reavertm Exp $ depend() { need net @@ -11,23 +11,28 @@ depend() { LOGFILE="/var/log/quassel.log" CORE="$(which quasselcore)" PID="/var/run/quassel.pid" -CONFIGDIR="/var/lib/quassel/" +CONFIGDIR="/var/lib/quassel" QUASSEL_USER="quassel" checkconfig() { + # set defaults + LISTEN=${LISTEN:-"0.0.0.0"} + LOGLEVEL=${LOGLEVEL:-"Info"} + PORT=${PORT:-"4242"} + # check config folder if [ ! -d "${CONFIGDIR}" ]; then - mkdir ${CONFIGDIR} || return 1 + mkdir "${CONFIGDIR}" || return 1 fi # permissions always changed just to avoid runtime issues - chown -r ${QUASSEL_USER}:${QUASSEL_USER} ${CONFIGDIR} || return 1 + chown -R "${QUASSEL_USER}":"${QUASSEL_USER}" "${CONFIGDIR}" || return 1 # check log file if [ ! -e "${LOGFILE}" ]; then - touch ${LOGFILE} || return 1 + touch "${LOGFILE}" || return 1 fi # permissions always changed just to avoid runtime issues - chown ${QUASSEL_USER}:${QUASSEL_USER} ${LOGFILE} || return 1 + chown "${QUASSEL_USER}":"${QUASSEL_USER}" "${LOGFILE}" || return 1 } start() { @@ -37,24 +42,24 @@ start() { if [ -n "${RC_UNAME}" ]; then # running on baselayout-2/openrc - start-stop-daemon --start --user ${QUASSEL_USER} --background --make-pidfile \ - --pidfile ${PID} \ - --exec ${CORE} -- --logfile=${LOGFILE} --loglevel=${LOGLEVEL:-"Info"} \ - --listen=${LISTEN:-"0.0.0.0"} --port=${PORT:-"4242"} \ - --configdir=${CONFIGDIR:-"/var/lib/quassel/"} + start-stop-daemon --start --user "${QUASSEL_USER}" --background --make-pidfile \ + --pidfile "${PID}" \ + --exec "${CORE}" -- --logfile="${LOGFILE}" --loglevel="${LOGLEVEL}" \ + --listen="${LISTEN}" --port="${PORT}" \ + --configdir="${CONFIGDIR}" else # running on baselayout-1 - start-stop-daemon --start --chuid ${QUASSEL_USER} --background --make-pidfile \ - --pidfile ${PID} --env HOME="/var/lib/quassel/" \ - --exec ${CORE} -- --logfile=${LOGFILE} --loglevel=${LOGLEVEL:-"Info"} \ - --listen=${LISTEN:-"0.0.0.0"} --port=${PORT:-"4242"} \ - --configdir=${CONFIGDIR:-"/var/lib/quassel/"} + start-stop-daemon --start --chuid "${QUASSEL_USER}" --background --make-pidfile \ + --pidfile "${PID}" --env HOME="${CONFIGDIR}" \ + --exec "${CORE}" -- --logfile="${LOGFILE}" --loglevel="${LOGLEVEL}" \ + --listen="${LISTEN}" --port="${PORT}" \ + --configdir="${CONFIGDIR}" fi eend $? } stop() { ebegin "Stopping Quassel Core" - start-stop-daemon --stop --pidfile ${PID} --exec ${CORE} + start-stop-daemon --stop --pidfile "${PID}" --exec "${CORE}" eend $? } diff --git a/net-irc/quassel/quassel-9999.ebuild b/net-irc/quassel/quassel-9999.ebuild index ae2b56a0032b..422970bebf25 100644 --- a/net-irc/quassel/quassel-9999.ebuild +++ b/net-irc/quassel/quassel-9999.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/quassel-9999.ebuild,v 1.39 2010/07/03 08:26:39 reavertm Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/quassel-9999.ebuild,v 1.40 2010/07/03 10:30:54 reavertm Exp $ EAPI="2" @@ -139,6 +139,6 @@ pkg_postinst() { ewarn "/home/\${QUASSEL_USER}/.config/quassel-irc.org/" ewarn "to: ${QUASSEL_DIR}." echo - ewarn "For migration. Stop the core, move the files to new location and then start server again." + ewarn "For migration, stop the core, move quasselcore files (pretty much everything apart from quasselclient.conf and settings.qss) into new location and then start server again." fi } |