diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-03-09 16:53:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-03-09 16:53:27 +0000 |
commit | 80208fb578cf92cc308906660ca6d7860c6b2a1f (patch) | |
tree | 6f06818031b553c506fc10dfe9908a835df288aa /net-im/jabberd2/files/jabberd2-2.3.2.init | |
parent | 06a7b5647e11a8ddf69b1c3d3ded6a8ba28b923e (diff) |
gentoo resync : 09.03.2018
Diffstat (limited to 'net-im/jabberd2/files/jabberd2-2.3.2.init')
-rw-r--r-- | net-im/jabberd2/files/jabberd2-2.3.2.init | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/net-im/jabberd2/files/jabberd2-2.3.2.init b/net-im/jabberd2/files/jabberd2-2.3.2.init deleted file mode 100644 index 4ef8aaea2c24..000000000000 --- a/net-im/jabberd2/files/jabberd2-2.3.2.init +++ /dev/null @@ -1,96 +0,0 @@ -#!/sbin/openrc-run -# Copyright 1999-2016 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 - -extra_commands="reload" - -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_pre() { - checkpath -d -o jabber /var/run/jabber -} - -start() { - - einfo "Starting Jabber Server ..." - local services executable cfgfile pidfile - 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})" - pidfile="$(grep -v ^# ${cfgfile} | grep '<pidfile>' | sed 's#<.\?pidfile>##g')" - start-stop-daemon \ - --background \ - --start \ - --user jabber:jabber \ - --exec /usr/bin/${service} \ - --pid ${pidfile} \ - -- -c ${cfgfile} - eend $? - - done - eoutdent - -} - -reload() { - eindent - for pidfile in /var/run/jabber/*.pid; do - if [ -f "${pidfile}" ]; then - service=$(basename ${pidfile} .pid) - ebegin "Reloading ${service}" - kill -HUP $(cat ${pidfile}) - eend $? - fi - done - eoutdent -} - -stop() { - - einfo "Stopping Jabber Server" - stopJabberServices - -} |