diff options
author | Thomas Anderson <gentoofan23@gentoo.org> | 2009-05-08 15:24:09 +0000 |
---|---|---|
committer | Thomas Anderson <gentoofan23@gentoo.org> | 2009-05-08 15:24:09 +0000 |
commit | 569abf53043f21356e3362288f2aff934e2c8cfc (patch) | |
tree | 5110cc85d14232c12be3b0be7bc049cfe10ead53 /net-im/jabberd2/files | |
parent | Version bump. Adds Esc keybinding to return to end of scrollback and focus th... (diff) | |
download | gentoo-2-569abf53043f21356e3362288f2aff934e2c8cfc.tar.gz gentoo-2-569abf53043f21356e3362288f2aff934e2c8cfc.tar.bz2 gentoo-2-569abf53043f21356e3362288f2aff934e2c8cfc.zip |
Version bump.
(Portage version: 2.1.6.11/cvs/Linux x86_64)
Diffstat (limited to 'net-im/jabberd2/files')
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.2.8.init | 77 | ||||
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.2.8.pamd | 6 |
2 files changed, 83 insertions, 0 deletions
diff --git a/net-im/jabberd2/files/jabberd2-2.2.8.init b/net-im/jabberd2/files/jabberd2-2.2.8.init new file mode 100644 index 000000000000..0c64021a449a --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.2.8.init @@ -0,0 +1,77 @@ +#!/sbin/runscript +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/jabberd2/files/jabberd2-2.2.8.init,v 1.1 2009/05/08 15:24:09 gentoofan23 Exp $ + +depend() { + need net + use mysql postgresql slapd + provide jabber-server +} + +stopJabberServices() { + + eindent + for pidfile in /var/run/jabber/*.pid; do + if [ -f "${pidfile}" ]; then + service=$(basename ${pidfile} .pid) + ebegin "Stopping ${service}" + start-stop-daemon \ + --stop \ + --pidfile ${pidfile} + eend $? + fi + done + eoutdent + +} + +start() { + + einfo "Starting Jabber Server ..." + local services + services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}') + eindent + for service in ${services}; do + + cfgfile=$(echo ${service} | cut -d ':' -f 2) + service=$(echo ${service} | cut -d ':' -f 1) + if [ ! -f "${cfgfile}" ]; then + if [ -f "/etc/jabber/${service}.xml" ]; then + cfgfile="/etc/jabber/${service}.xml" + else + eerror "Can't find: ${cfgfile} or default /etc/jabber/${service}.xml" + stopJabberServices + return 1 + fi + fi + + executable=/usr/bin/${service} + + if [ ! -f "${executable}" ]; then + eerror "Can't find executable: ${executable}" + stopJabberServices + return 1 + fi + + ebegin "Starting ${service} (${cfgfile})" + start-stop-daemon \ + --background \ + --start \ + --chuid jabber:jabber \ + --exec /usr/bin/${service} \ + --pid /var/run/jabber/$(basename ${cfgfile%.xml}).pid \ + -- -c ${cfgfile} + eend $? + + done + eoutdent + +} + +stop() { + + einfo "Stopping Jabber Server" + stopJabberServices + +} diff --git a/net-im/jabberd2/files/jabberd2-2.2.8.pamd b/net-im/jabberd2/files/jabberd2-2.2.8.pamd new file mode 100644 index 000000000000..2c5a5347ad6a --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.2.8.pamd @@ -0,0 +1,6 @@ +#%PAM-1.0 + +auth required pam_nologin.so +auth include system-auth +account include system-auth +session include system-auth |