diff options
author | Daniel Pielmeier <billie@gentoo.org> | 2010-04-28 18:42:42 +0000 |
---|---|---|
committer | Daniel Pielmeier <billie@gentoo.org> | 2010-04-28 18:42:42 +0000 |
commit | d7a2e3a9ab5f048bc439e9959edb134c991f3eb0 (patch) | |
tree | df85ac0dbe53ef150cd66274d0240dffe2c15335 /net-irc | |
parent | Fix typo on pkg_config (diff) | |
download | gentoo-2-d7a2e3a9ab5f048bc439e9959edb134c991f3eb0.tar.gz gentoo-2-d7a2e3a9ab5f048bc439e9959edb134c991f3eb0.tar.bz2 gentoo-2-d7a2e3a9ab5f048bc439e9959edb134c991f3eb0.zip |
Add support for a local postgres backend to the init script to make the database available when quasselcore starts up. Fixes bug #316799, thanks to Aaron W. Swenson for reporting.
(Portage version: 2.1.8.3/cvs/Linux i686)
Diffstat (limited to 'net-irc')
-rw-r--r-- | net-irc/quassel/ChangeLog | 8 | ||||
-rw-r--r-- | net-irc/quassel/files/quasselcore-2.conf | 5 | ||||
-rw-r--r-- | net-irc/quassel/files/quasselcore-2.init | 16 |
3 files changed, 22 insertions, 7 deletions
diff --git a/net-irc/quassel/ChangeLog b/net-irc/quassel/ChangeLog index b5e421dff650..fc6889ccc8c4 100644 --- a/net-irc/quassel/ChangeLog +++ b/net-irc/quassel/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-irc/quassel # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/ChangeLog,v 1.85 2010/04/18 11:44:34 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/ChangeLog,v 1.86 2010/04/28 18:42:42 billie Exp $ + + 28 Apr 2010; Daniel Pielmeier <billie@gentoo.org> + files/quasselcore-2.conf, files/quasselcore-2.init: + Add support for a local postgres backend to the init script to make the + database available when quasselcore starts up. Fixes bug #316799, thanks + to Aaron W. Swenson for reporting. *quassel-0.6.1 (18 Apr 2010) diff --git a/net-irc/quassel/files/quasselcore-2.conf b/net-irc/quassel/files/quasselcore-2.conf index a824606eb112..4b18a63c4b8c 100644 --- a/net-irc/quassel/files/quasselcore-2.conf +++ b/net-irc/quassel/files/quasselcore-2.conf @@ -16,3 +16,8 @@ PORT="4242" # Specify the directory holding configuration files, the SQlite database # and the SSL Cert. Default is ~/.config/quassel-irc.org CONFIGDIR="/home/${QUASSEL_USER}/.config/quassel-irc.org" + +# Uncomment the following line if quasselcore uses the PostgreSQL Server +# backend and they both run on the same machine. This ensures the database +# is available when quasselcore starts. +#LOCAL_PGSQL="yes" diff --git a/net-irc/quassel/files/quasselcore-2.init b/net-irc/quassel/files/quasselcore-2.init index a58197dfbb0b..04bbe24a5e84 100644 --- a/net-irc/quassel/files/quasselcore-2.init +++ b/net-irc/quassel/files/quasselcore-2.init @@ -1,14 +1,18 @@ #!/sbin/runscript # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore-2.init,v 1.1 2009/02/20 20:02:08 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore-2.init,v 1.2 2010/04/28 18:42:42 billie Exp $ depend() { - need net + if [ "${LOCAL_PGSQL}" == "yes" ]; then + need net postgresql + else + need net + fi } checkconfig() { - if [ -z "${QUASSEL_USER}" ] ; then + if [ -z "${QUASSEL_USER}" ]; then eerror "Did you read the elog messages? You need to define the" eerror "QUASSEL_USER variable in /etc/conf.d/quasselcore first." return 1 @@ -19,12 +23,12 @@ start() { checkconfig || return 1 ebegin "Starting Quassel Core" - local LOGFILE="/var/log/quassel.log" - if [ ! -e ${LOGFILE} ] ; then + local LOGFILE=/var/log/quassel.log + if [ ! -e "${LOGFILE}" ]; then touch ${LOGFILE} && chown ${QUASSEL_USER} ${LOGFILE} fi - if [[ -n "${RC_UNAME}" ]]; then + if [ -n "${RC_UNAME}" ]; then # running on baselayout-2/openrc start-stop-daemon --start --user ${QUASSEL_USER} --background --make-pidfile \ --pidfile /var/run/quassel.pid --exec /usr/bin/quasselcore -- --logfile=${LOGFILE} \ |