summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-02-20 20:02:08 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-02-20 20:02:08 +0000
commit877ab96f1fafeb3845cabd197e964373a53a9c44 (patch)
tree1abe7ffc70a91a7bc2a77fae77c1425b428ef384 /net-irc/quassel/files
parentBump sys-cluster/openmpi-1.2.9 (diff)
downloadhistorical-877ab96f1fafeb3845cabd197e964373a53a9c44.tar.gz
historical-877ab96f1fafeb3845cabd197e964373a53a9c44.tar.bz2
historical-877ab96f1fafeb3845cabd197e964373a53a9c44.zip
Revision bump. Update initscripts. Fix live correctly. Proxycommit for billie
Package-Manager: portage-2.2_rc23/cvs/Linux x86_64
Diffstat (limited to 'net-irc/quassel/files')
-rw-r--r--net-irc/quassel/files/quasselcore-2.conf18
-rw-r--r--net-irc/quassel/files/quasselcore-2.init48
2 files changed, 66 insertions, 0 deletions
diff --git a/net-irc/quassel/files/quasselcore-2.conf b/net-irc/quassel/files/quasselcore-2.conf
new file mode 100644
index 000000000000..a824606eb112
--- /dev/null
+++ b/net-irc/quassel/files/quasselcore-2.conf
@@ -0,0 +1,18 @@
+# /etc/conf.d/quasselcore
+
+# The user owning the quasselcore daemon.
+QUASSEL_USER=""
+
+# Loglevel Debug|Info|Warning|Error. Default is: Info
+# The logfile is located at /var/log/quassel.log.
+LOGLEVEL="Info"
+
+# The address(es) quasselcore will listen on. Default is: 0.0.0.0
+LISTEN="0.0.0.0"
+
+# The port quasselcore will listen at. Default is: 4242
+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"
diff --git a/net-irc/quassel/files/quasselcore-2.init b/net-irc/quassel/files/quasselcore-2.init
new file mode 100644
index 000000000000..a58197dfbb0b
--- /dev/null
+++ b/net-irc/quassel/files/quasselcore-2.init
@@ -0,0 +1,48 @@
+#!/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 $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ 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
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting Quassel Core"
+ local LOGFILE="/var/log/quassel.log"
+ if [ ! -e ${LOGFILE} ] ; then
+ touch ${LOGFILE} && chown ${QUASSEL_USER} ${LOGFILE}
+ fi
+
+ 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} \
+ --loglevel=${LOGLEVEL:-"Info"} --listen=${LISTEN:-"0.0.0.0"} --port=${PORT:-"4242"} \
+ --configdir=${CONFIGDIR:-"/home/${QUASSEL_USER}/.config/quassel-irc.org"}
+ else
+ # running on baselayout-1
+ start-stop-daemon --start --chuid ${QUASSEL_USER} --background --make-pidfile \
+ --pidfile /var/run/quassel.pid --env HOME="/home/${QUASSEL_USER}" \
+ --exec /usr/bin/quasselcore -- --logfile=${LOGFILE} --loglevel=${LOGLEVEL:-"Info"} \
+ --listen=${LISTEN:-"0.0.0.0"} --port=${PORT:-"4242"} \
+ --configdir=${CONFIGDIR:-"/home/${QUASSEL_USER}/.config/quassel-irc.org"}
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Quassel Core"
+ start-stop-daemon --stop --pidfile /var/run/quassel.pid --exec /usr/bin/quasselcore
+ eend $?
+}