summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBjarke Istrup Pedersen <gurligebis@gentoo.org>2007-02-26 00:03:08 +0000
committerBjarke Istrup Pedersen <gurligebis@gentoo.org>2007-02-26 00:03:08 +0000
commitf65f44dd4a18fa0f8cc86affa53b1b6434c243c2 (patch)
tree17ff42492ad608b4ae77fab4e28160da4dcd79fa /net-irc/psybnc/files
parentAdd optional Perl deps, bug #155342 (diff)
downloadhistorical-f65f44dd4a18fa0f8cc86affa53b1b6434c243c2.tar.gz
historical-f65f44dd4a18fa0f8cc86affa53b1b6434c243c2.tar.bz2
historical-f65f44dd4a18fa0f8cc86affa53b1b6434c243c2.zip
Moving away from /opt, fixing bug #154164
Package-Manager: portage-2.1.2-r11
Diffstat (limited to 'net-irc/psybnc/files')
-rw-r--r--net-irc/psybnc/files/digest-psybnc-2.3.2.7-r2 (renamed from net-irc/psybnc/files/digest-psybnc-2.3.2.7-r1)0
-rw-r--r--net-irc/psybnc/files/psybnc-2.3.2.7-r1-gentoo.diff11
-rw-r--r--net-irc/psybnc/files/psybnc.confd8
-rw-r--r--net-irc/psybnc/files/psybnc.initd28
4 files changed, 24 insertions, 23 deletions
diff --git a/net-irc/psybnc/files/digest-psybnc-2.3.2.7-r1 b/net-irc/psybnc/files/digest-psybnc-2.3.2.7-r2
index d521eb7e80b0..d521eb7e80b0 100644
--- a/net-irc/psybnc/files/digest-psybnc-2.3.2.7-r1
+++ b/net-irc/psybnc/files/digest-psybnc-2.3.2.7-r2
diff --git a/net-irc/psybnc/files/psybnc-2.3.2.7-r1-gentoo.diff b/net-irc/psybnc/files/psybnc-2.3.2.7-r1-gentoo.diff
deleted file mode 100644
index 2b24e8693a1b..000000000000
--- a/net-irc/psybnc/files/psybnc-2.3.2.7-r1-gentoo.diff
+++ /dev/null
@@ -1,11 +0,0 @@
---- tools/autoconf.c 2004-05-07 01:33:25.956597616 +0200
-+++ tools/autoconf.c 2004-05-07 01:33:43.075995072 +0200
-@@ -462,7 +462,7 @@
- fprintf(makefile," @echo \"* for the sake of correct Cert-Checking *\"\n");
- fprintf(makefile," @echo \"*******************************************\"\n");
- fprintf(makefile," @echo \"Generating certificate request .. \"\n");
-- fprintf(makefile," @%s req -new -config src/ssl.cnf -out key/psybnc.req.pem \\\n",sslbin);
-+ fprintf(makefile," @%s req -batch -new -config src/ssl.cnf -out key/psybnc.req.pem \\\n",sslbin);
- fprintf(makefile," -keyout key/psybnc.key.pem -nodes\n");
- fprintf(makefile," @echo \"Generating self-signed certificate .. \"\n");
- fprintf(makefile," @%s req -x509 -days 365 -in key/psybnc.req.pem \\\n",sslbin);
diff --git a/net-irc/psybnc/files/psybnc.confd b/net-irc/psybnc/files/psybnc.confd
index dfaaa010f277..cdd8f31f9457 100644
--- a/net-irc/psybnc/files/psybnc.confd
+++ b/net-irc/psybnc/files/psybnc.confd
@@ -1,3 +1,5 @@
-# psybnc start-up options
-USER="psybnc"
-BNCPATH="/opt/psybnc"
+# /etc/conf.d/psybnc
+
+PSYBNC_CONFIG="/etc/psybnc/psybnc.conf"
+PSYBNC_HOME="/var/lib/psybnc"
+PSYBNC_USER="psybnc"
diff --git a/net-irc/psybnc/files/psybnc.initd b/net-irc/psybnc/files/psybnc.initd
index add796fa7aae..12e7b5aa8be6 100644
--- a/net-irc/psybnc/files/psybnc.initd
+++ b/net-irc/psybnc/files/psybnc.initd
@@ -1,32 +1,42 @@
#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-irc/psybnc/files/psybnc.initd,v 1.2 2007/02/26 00:03:08 gurligebis Exp $
depend() {
need net
}
check_config() {
- if [ -z "${USER}" ]
+ if [[ ! -f ${PSYBNC_CONFIG} ]]
then
- eerror "Please set \$USER in /etc/conf.d/psybnc!"
+ eerror "Please set \$PSYBNC_CONFIG in /etc/conf.d/psybnc!"
return 1
fi
- if [ -z "${BNCPATH}" ]
+
+ if [[ ! -d "${PSYBNC_HOME}" ]]
+ then
+ eerror "Please set \$PSYBNC_HOME in /etc/conf.d/psybnc!"
+ return 1
+ fi
+
+ if [[ -z "${PSYBNC_USER}" ]]
then
- eerror "Please set \$BNCPATH in /etc/conf.d/psybnc!"
+ eerror "Please set \$PSYBNC_USER in /etc/conf.d/psybnc!"
return 1
fi
}
start() {
- ebegin "Starting psybnc"
check_config || return 1
- export HOME="${BNCPATH}"
- start-stop-daemon -c ${USER} -S -q --chdir ${BNCPATH} -x ${BNCPATH}/psybnc 1>/dev/null 2>&1
+ ebegin "Starting psyBNC"
+ start-stop-daemon --start --quiet --chuid "${PSYBNC_USER}" --chdir "${PSYBNC_HOME}" --exec /usr/bin/psybnc -- "${PSYBNC_CONFIG}" &>/dev/null
eend $?
}
stop() {
- ebegin "Stopping psybnc"
- start-stop-daemon -K -q --exec ${BNCPATH}/psybnc -s 9
+ check_config || return 1
+ ebegin "Stopping psyBNC"
+ start-stop-daemon --stop --quiet --pidfile "${PSYBNC_HOME}"/psybnc.pid --signal 9
eend $?
}