1 |
billie 10/04/28 18:42:42 |
2 |
|
3 |
Modified: quasselcore-2.init quasselcore-2.conf |
4 |
Log: |
5 |
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. |
6 |
(Portage version: 2.1.8.3/cvs/Linux i686) |
7 |
|
8 |
Revision Changes Path |
9 |
1.2 net-irc/quassel/files/quasselcore-2.init |
10 |
|
11 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/quassel/files/quasselcore-2.init?rev=1.2&view=markup |
12 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/quassel/files/quasselcore-2.init?rev=1.2&content-type=text/plain |
13 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/quassel/files/quasselcore-2.init?r1=1.1&r2=1.2 |
14 |
|
15 |
Index: quasselcore-2.init |
16 |
=================================================================== |
17 |
RCS file: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore-2.init,v |
18 |
retrieving revision 1.1 |
19 |
retrieving revision 1.2 |
20 |
diff -u -r1.1 -r1.2 |
21 |
--- quasselcore-2.init 20 Feb 2009 20:02:08 -0000 1.1 |
22 |
+++ quasselcore-2.init 28 Apr 2010 18:42:42 -0000 1.2 |
23 |
@@ -1,14 +1,18 @@ |
24 |
#!/sbin/runscript |
25 |
# Copyright 1999-2008 Gentoo Foundation |
26 |
# Distributed under the terms of the GNU General Public License v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore-2.init,v 1.1 2009/02/20 20:02:08 scarabeus Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore-2.init,v 1.2 2010/04/28 18:42:42 billie Exp $ |
29 |
|
30 |
depend() { |
31 |
- need net |
32 |
+ if [ "${LOCAL_PGSQL}" == "yes" ]; then |
33 |
+ need net postgresql |
34 |
+ else |
35 |
+ need net |
36 |
+ fi |
37 |
} |
38 |
|
39 |
checkconfig() { |
40 |
- if [ -z "${QUASSEL_USER}" ] ; then |
41 |
+ if [ -z "${QUASSEL_USER}" ]; then |
42 |
eerror "Did you read the elog messages? You need to define the" |
43 |
eerror "QUASSEL_USER variable in /etc/conf.d/quasselcore first." |
44 |
return 1 |
45 |
@@ -19,12 +23,12 @@ |
46 |
checkconfig || return 1 |
47 |
|
48 |
ebegin "Starting Quassel Core" |
49 |
- local LOGFILE="/var/log/quassel.log" |
50 |
- if [ ! -e ${LOGFILE} ] ; then |
51 |
+ local LOGFILE=/var/log/quassel.log |
52 |
+ if [ ! -e "${LOGFILE}" ]; then |
53 |
touch ${LOGFILE} && chown ${QUASSEL_USER} ${LOGFILE} |
54 |
fi |
55 |
|
56 |
- if [[ -n "${RC_UNAME}" ]]; then |
57 |
+ if [ -n "${RC_UNAME}" ]; then |
58 |
# running on baselayout-2/openrc |
59 |
start-stop-daemon --start --user ${QUASSEL_USER} --background --make-pidfile \ |
60 |
--pidfile /var/run/quassel.pid --exec /usr/bin/quasselcore -- --logfile=${LOGFILE} \ |
61 |
|
62 |
|
63 |
|
64 |
1.2 net-irc/quassel/files/quasselcore-2.conf |
65 |
|
66 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/quassel/files/quasselcore-2.conf?rev=1.2&view=markup |
67 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/quassel/files/quasselcore-2.conf?rev=1.2&content-type=text/plain |
68 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-irc/quassel/files/quasselcore-2.conf?r1=1.1&r2=1.2 |
69 |
|
70 |
Index: quasselcore-2.conf |
71 |
=================================================================== |
72 |
RCS file: /var/cvsroot/gentoo-x86/net-irc/quassel/files/quasselcore-2.conf,v |
73 |
retrieving revision 1.1 |
74 |
retrieving revision 1.2 |
75 |
diff -u -r1.1 -r1.2 |
76 |
--- quasselcore-2.conf 20 Feb 2009 20:02:08 -0000 1.1 |
77 |
+++ quasselcore-2.conf 28 Apr 2010 18:42:42 -0000 1.2 |
78 |
@@ -16,3 +16,8 @@ |
79 |
# Specify the directory holding configuration files, the SQlite database |
80 |
# and the SSL Cert. Default is ~/.config/quassel-irc.org |
81 |
CONFIGDIR="/home/${QUASSEL_USER}/.config/quassel-irc.org" |
82 |
+ |
83 |
+# Uncomment the following line if quasselcore uses the PostgreSQL Server |
84 |
+# backend and they both run on the same machine. This ensures the database |
85 |
+# is available when quasselcore starts. |
86 |
+#LOCAL_PGSQL="yes" |