[Lunar-commits] <moonbase-other> ejabberd: Fixed the module a bit, also added a systemd unit file
Stefan Wold
ratler at lunar-linux.org
Thu Aug 9 22:20:37 CEST 2012
commit 9bc1688f72aba9146256f25e5d8dbd4bd27594e6
Author: Stefan Wold <ratler at lunar-linux.org>
Date: Thu, 09 Aug 2012 13:20:37 -0700
URL: https://github.com/lunar-linux/moonbase-other/commit/9bc1688f72aba9146256f25e5d8dbd4bd27594e6
ejabberd: Fixed the module a bit, also added a systemd unit file
---
chat/ejabberd/BUILD +15/-7
chat/ejabberd/DETAILS +8/-2
chat/ejabberd/systemd.d/ejabberd.service +20/-0
chat/ejabberd/tmpfiles.d/ejabberd.conf +1/-0
4 files changed, 44 insertions (+), 9 deletions (-)
--- a/chat/ejabberd/BUILD
+++ b/chat/ejabberd/BUILD
@@ -1,19 +1,27 @@
(
- add_priv_user ejabberd:jabber -d /var/lib/ejabberd
- cd src &&
- sedit "s;EJABBERDDIR = \$(DESTDIR)@prefix@/var/lib/ejabberd;EJABBERDDIR = \$(DESTDIR)@prefix@/usr/lib/ejabberd;g" Makefile.in &&
+ add_priv_user ejabberd:jabber -d /var/lib/ejabberd
+
+ patch_it $SOURCE2 1 &&
+ patch_it $SOURCE3 1 &&
if module_installed Linux-PAM; then
OPTS+=" --enable-pam"
fi &&
-
+
+ cd src &&
default_build &&
-
- install -d -o ejabberd -g jabber /var/{spool,lib,log}/ejabberd &&
- chmod 750 /var/{spool,lib,log}/ejabberd &&
+
+ install -d -m 0770 -o ejabberd -g jabber /var/{lib,log}/ejabberd &&
+ if [ -d /var/spool/ejabberd ]; then
+ devoke_installwatch
+ cp -a /var/spool/ejabberd/* /var/lib/ejabberd/
+ mv /var/spool/ejabberd{,.old-$$}
+ invoke_installwatch
+ fi &&
chown root:jabber /etc/ejabberd/ejabberd.cfg /etc/ejabberd/ejabberdctl.cfg /etc/ejabberd &&
chmod 640 /etc/ejabberd/ejabberd.cfg /etc/ejabberd/ejabberdctl.cfg &&
+ install -d -m 0750 -o ejabberd -g jabber /var/lock/ejabberdctl &&
if [ -f /usr/lib/ejabberd/priv/bin/epam ]; then
chown root:jabber /usr/lib/ejabberd/priv/bin/epam
--- a/chat/ejabberd/DETAILS
+++ b/chat/ejabberd/DETAILS
@@ -1,13 +1,19 @@
MODULE=ejabberd
VERSION=2.1.11
SOURCE=${MODULE}-${VERSION}.tgz
+ SOURCE2=ejabberd-2.1.11-fix-file-perms.patch
+ SOURCE3=ejabberd-2.1.11-run-as-ejabberd.patch
SOURCE_URL=http://www.process-one.net/downloads/ejabberd/$VERSION
+ SOURCE2_URL=$PATCH_URL
+ SOURCE3_URL=$PATCH_URL
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$MODULE-$VERSION
SOURCE_VFY=sha256:91d5c10e64f9faa60c345c68304746f493d71f82723302955d40d6619e3d87de
+ SOURCE2_VFY=sha256:486025fc0e8158482e0a24527bac57bac7e9eea722ef6cde9e405ae0e3205455
+ SOURCE3_VFY=sha256:642c7eb9720fe486707104cff8dc44d708cdae85e930ab103ae03b078fc97f8a
WEB_SITE="http://www.ejabberd.im/"
ENTERED=20110215
- UPDATED=20120616
- SHORT="An erlang jabber server"
+ UPDATED=20120809
+ SHORT="An erlang Jabber/XMPP server"
cat <<EOF
An erlang jabber server
EOF
--- /dev/null
+++ b/chat/ejabberd/systemd.d/ejabberd.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=A Jabber/XMPP Server
+After=network.target
+
+[Service]
+Type=oneshot
+User=ejabberd
+Group=jabber
+LimitNOFILE=16384
+RestartSec=5
+ExecStart=/usr/sbin/ejabberdctl \
+ --config /etc/ejabberd/ejabberd.cfg \
+ --ctl-config /etc/ejabberd/ejabberdctl.cfg \
+ --logs "/var/log/ejabberd" \
+ --spool "/var/lib/ejabberd" start
+ExecStop=/usr/sbin/ejabberdctl stop
+RemainAfterExit=yes
+
+[Install]
+WantedBy=multi-user.target
--- /dev/null
+++ b/chat/ejabberd/tmpfiles.d/ejabberd.conf
@@ -0,0 +1 @@
+d /var/lock/ejabberdctl 0750 ejabberd jabber
More information about the Lunar-commits
mailing list