diff options
Diffstat (limited to 'community/ejabberd')
-rw-r--r-- | community/ejabberd/PKGBUILD | 13 | ||||
-rw-r--r-- | community/ejabberd/ejabberd | 63 |
2 files changed, 6 insertions, 70 deletions
diff --git a/community/ejabberd/PKGBUILD b/community/ejabberd/PKGBUILD index 812a0255c..961e9d00e 100644 --- a/community/ejabberd/PKGBUILD +++ b/community/ejabberd/PKGBUILD @@ -1,11 +1,11 @@ -# $Id: PKGBUILD 87844 2013-04-08 09:22:21Z spupykin $ +# $Id: PKGBUILD 91490 2013-05-23 10:12:55Z spupykin $ # Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> # Contributor: Jeff 'codemac' Mickey <jeff@archlinux.org> # Contributor: Alexander Rødseth <rodseth@gmail.com> pkgname=ejabberd pkgver=2.1.12 -pkgrel=1 +pkgrel=4 pkgdesc="Jabber server written in Erlang" arch=('x86_64' 'i686' 'mips64el') url="http://www.ejabberd.im/" @@ -17,11 +17,9 @@ backup=('etc/ejabberd/ejabberd.cfg' install=$pkgname.install source=("http://www.process-one.net/downloads/ejabberd/${pkgver/_/-}/ejabberd-${pkgver}.tgz" "$pkgname.logrotate" - "$pkgname" "ejabberd.service") md5sums=('7d49242cf04282f3c4cebfafa2cc2f46' 'f97c8a96160f30e0aecc9526c12e6606' - '2338a6230ce5f9f60be6dddcfa39bc7e' 'df32aa17e40a7bc5d9946d3ba6fe5e16') build() { @@ -34,12 +32,13 @@ build() { package() { cd "$srcdir/$pkgname-$pkgver/src" make DESTDIR="$pkgdir" install - install -D -m 0755 "$srcdir/$pkgname" "$pkgdir/etc/rc.d/$pkgname" install -d "$pkgdir/var/lib/$pkgname" install -D -m0644 "$srcdir/$pkgname.logrotate" "$pkgdir/etc/logrotate.d/$pkgname" chmod ug+r "$pkgdir/etc/$pkgname/"* - chmod a+rx "$pkgdir/usr/sbin/ejabberdctl" - rm -rf "$pkgdir/var/lock" + mkdir -p $pkgdir/usr/bin + mv $pkgdir/usr/sbin/ejabberdctl $pkgdir/usr/bin/ejabberdctl + chmod a+rx "$pkgdir/usr/bin/ejabberdctl" "$pkgdir/usr/lib/ejabberd/priv/bin/captcha.sh" + rm -rf "$pkgdir/var/lock" "$pkgdir/usr/sbin" install -Dm0644 $srcdir/ejabberd.service $pkgdir/usr/lib/systemd/system/ejabberd.service } diff --git a/community/ejabberd/ejabberd b/community/ejabberd/ejabberd deleted file mode 100644 index c73be811c..000000000 --- a/community/ejabberd/ejabberd +++ /dev/null @@ -1,63 +0,0 @@ -#!/bin/bash - -. /etc/rc.conf -. /etc/rc.d/functions - -cd /var/log/ejabberd/ - -get_pid() { - pidof epmd >/dev/null || { echo '' ; return 0; } - # get port from 'epmd -names', then get pid from 'ss -tlnp' - PORT=`epmd -names | grep ejabberd | cut -f5 -d\ ` - [ -z "$PORT" ] && { echo '' ; return 0; } - PID=`ss -tlnp | grep $PORT | grep -oE '[[:digit:]]+,' | cut -d, -f1` - [ -z "$PID" ] && { echo '' ; return 0; } - echo ${PID%/} -} - -case "$1" in - start) - stat_busy "Starting ejabber daemon" - - [ -d /var/lock/ejabberdctl ] || mkdir -p /var/lock/ejabberdctl - [ -f /var/run/ejabber.pid ] && rm -f /var/run/ejabber.pid - PID=`get_pid` - if [ -z "$PID" ]; then - su ejabberd -s /bin/bash - -c 'erl -pa /usr/lib/ejabberd/ebin -sname ejabberd -s ejabberd -ejabberd config \"/etc/ejabberd/ejabberd.cfg\" log_path \"/var/log/ejabberd/ejabberd.log\" -sasl sasl_error_logger \{file,\"/var/log/ejabberd/sasl.log\"\} -mnesia dir \"/var/lib/ejabberd\" -detached -kernel inetrc \"/etc/ejabberd/inetrc\"' - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - echo `get_pid` > /var/run/ejabberd.pid - add_daemon ejabberd - stat_done - fi - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping ejabber daemon" - PID=`get_pid` - [ ! -z "$PID" ] && su ejabberd -s /bin/bash - -c "kill $PID" &> /dev/null - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - rm -f /var/run/ejabberd.pid &> /dev/null - rm_daemon ejabberd - stat_done - fi - ;; - - restart) - $0 stop - sleep 3 - $0 start - ;; - *) - echo "usage: $0 {start|stop|restart}" -esac -exit 0 |