summaryrefslogtreecommitdiff
path: root/community/prosody
diff options
context:
space:
mode:
Diffstat (limited to 'community/prosody')
-rw-r--r--community/prosody/PKGBUILD15
-rw-r--r--community/prosody/fix-config.patch2
-rw-r--r--community/prosody/prosody.install2
-rw-r--r--community/prosody/prosody.logrotated2
-rw-r--r--community/prosody/prosody.rcd93
5 files changed, 9 insertions, 105 deletions
diff --git a/community/prosody/PKGBUILD b/community/prosody/PKGBUILD
index 071bdf72a..4278a2596 100644
--- a/community/prosody/PKGBUILD
+++ b/community/prosody/PKGBUILD
@@ -1,11 +1,11 @@
-# $Id: PKGBUILD 81207 2012-12-13 02:54:35Z seblu $
+# $Id: PKGBUILD 90613 2013-05-13 10:55:37Z spupykin $
# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Maintainer: Dwayne Bent <dbb.0@liqd.org>
# Contributor: Paul-Sebastian Manole <brokenthorn@gmail.com>
pkgname=prosody
pkgver=0.8.2
-pkgrel=8
+pkgrel=9
pkgdesc="Lightweight and extensible Jabber/XMPP server written in Lua."
arch=('i686' 'x86_64')
url="http://prosody.im/"
@@ -16,15 +16,13 @@ install=prosody.install
backup=('etc/logrotate.d/prosody'
'etc/prosody/prosody.cfg.lua')
source=("http://prosody.im/depot/${pkgver}/prosody-${pkgver}.tar.gz"
- 'prosody.rcd'
'prosody.logrotated'
'fix-config.patch'
'prosody.tmpfile.d'
'prosody.service')
md5sums=('6e907bf0d0acf24f1011083020ba6ffb'
- 'd2b5f9c8e42bb31819e715eb1756ee53'
- '26466fdbea87963a3ca6f48f76fe4a29'
- '59a1bf2dfd0bd386cef6fa646e2a3752'
+ '5b44aee99f1fa9e7f055e067688cafbd'
+ 'a4a5b968b5809037f83465c571eb9afe'
'e2f5a1df410b05696a30dcb058841084'
'e74045f27cb60908d535969906781f75')
@@ -46,19 +44,16 @@ package() {
rm $pkgdir/etc/prosody/certs/*
- install -d "$pkgdir/etc/rc.d"
install -d "$pkgdir/etc/logrotate.d"
install -d "$pkgdir/var/log/prosody"
for i in tools/*.lua; do
install -Dm0644 $i $pkgdir/usr/share/prosody/$i
done
- install -o root -g root -m 755 "$srcdir/prosody.rcd" \
- "$pkgdir/etc/rc.d/prosody"
install -o root -g root -m 644 "$srcdir/prosody.logrotated" \
"$pkgdir/etc/logrotate.d/prosody"
install -Dm0644 COPYING $pkgdir/usr/share/licenses/$pkgname/COPYING
- install -Dm0644 $srcdir/prosody.tmpfile.d $pkgdir//usr/lib/tmpfiles.d/prosody.conf
+ install -Dm0644 $srcdir/prosody.tmpfile.d $pkgdir/usr/lib/tmpfiles.d/prosody.conf
install -Dm0644 $srcdir/prosody.service $pkgdir/usr/lib/systemd/system/prosody.service
}
diff --git a/community/prosody/fix-config.patch b/community/prosody/fix-config.patch
index 8856bfb92..3d01fd88a 100644
--- a/community/prosody/fix-config.patch
+++ b/community/prosody/fix-config.patch
@@ -6,7 +6,7 @@ diff -wbBur prosody-0.8.0/prosody.cfg.lua.dist prosody-0.8.0.my/prosody.cfg.lua.
-- Example: admins = { "user1@example.com", "user2@example.net" }
admins = { }
+daemonize = true
-+pidfile = "/var/run/prosody/prosody.pid"
++pidfile = "/run/prosody/prosody.pid"
-- Enable use of libevent for better performance under high load
-- For more information see: http://prosody.im/doc/libevent
diff --git a/community/prosody/prosody.install b/community/prosody/prosody.install
index f935e3d63..792681038 100644
--- a/community/prosody/prosody.install
+++ b/community/prosody/prosody.install
@@ -10,6 +10,8 @@ post_install() {
chown prosody:prosody var/log/prosody
echo ">> Documentation: http://wiki.archlinux.org/index.php/Prosody"
+
+ systemd-tmpfiles --create prosody.conf
}
post_upgrade() {
diff --git a/community/prosody/prosody.logrotated b/community/prosody/prosody.logrotated
index 5659ba01f..13876230f 100644
--- a/community/prosody/prosody.logrotated
+++ b/community/prosody/prosody.logrotated
@@ -4,6 +4,6 @@
sharedscripts
missingok
postrotate
- /bin/kill -HUP `cat /var/run/prosody/prosody.pid 2> /dev/null` 2> /dev/null || true
+ /bin/kill -HUP `cat /run/prosody/prosody.pid 2> /dev/null` 2> /dev/null || true
endscript
}
diff --git a/community/prosody/prosody.rcd b/community/prosody/prosody.rcd
deleted file mode 100644
index afaf77903..000000000
--- a/community/prosody/prosody.rcd
+++ /dev/null
@@ -1,93 +0,0 @@
-#!/bin/bash
-
-daemon_name=prosody
-pid_file=/var/run/$daemon_name/$daemon_name.pid
-
-source /etc/rc.conf
-source /etc/rc.d/functions
-
-get_pid() {
- if [ -f $pid_file ]; then
- /bin/kill -0 $(cat $pid_file)
- if [ $? == 0 ]; then
- cat $pid_file
- fi
- fi
-}
-
-case "$1" in
- start)
- stat_busy "Starting $daemon_name daemon"
-
- [ -d /var/run/$daemon_name ] || { mkdir -p /var/run/$daemon_name ; chown prosody:prosody /var/run/prosody; }
- PID=$(get_pid)
- if [ -z "$PID" ]; then
- [ -f $pid_file ] && rm -f $pid_file
- mkdir -p `dirname $pid_file`
- prosodyctl start 1>/dev/null 2>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- add_daemon $daemon_name
- stat_done
- fi
- else
- stat_fail
- printhl "$daemon_name is already running"
- exit 1
- fi
- ;;
-
- stop)
- stat_busy "Stopping $daemon_name daemon"
- PID=$(get_pid)
- if [ ! -z "$PID" ]; then
- prosodyctl stop 1>/dev/null 2>/dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- rm -f $pid_file &> /dev/null
- rm_daemon $daemon_name
- stat_done
- fi
- else
- stat_fail
- printhl "$daemon_name is not running"
- exit 1
- fi
- ;;
-
- restart)
- $0 stop
- $0 start
- ;;
-
- reload)
- stat_busy "Reloading $daemon_name"
- PID=$(get_pid)
- if [ ! -z "$PID" ]; then
- /bin/kill -HUP $PID 2> /dev/null
- if [ $? -gt 0 ]; then
- stat_fail
- exit 1
- else
- stat_done
- fi
- else
- stat_fail
- printhl "$daemon_name is not running"
- fi
- ;;
-
- status)
- stat_busy "Checking $daemon_name status";
- ck_status $daemon_name
- ;;
-
- *)
- echo "usage: $0 {start|stop|restart|reload|status}"
- esac
-
-exit 0