[net-im/ejabberd] bump to 19.02
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
diff --git a/Makefile.in b/Makefile.in
|
||||
index a0b4553d..4675b88a 100644
|
||||
--- a/Makefile.in
|
||||
+++ b/Makefile.in
|
||||
@@ -204,8 +204,8 @@ install: all copy-files
|
||||
chmod 755 ejabberd.init
|
||||
#
|
||||
# Service script
|
||||
- $(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" ejabberd.service.template \
|
||||
- > ejabberd.service
|
||||
+ [ -f ejabberd.service ] || $(SED) -e "s*@ctlscriptpath@*$(SBINDIR)*g" \
|
||||
+ ejabberd.service.template > ejabberd.service
|
||||
chmod 644 ejabberd.service
|
||||
#
|
||||
# Spool directory
|
||||
38
net-im/ejabberd/files/ejabberd-18.09-ejabberdctl.patch
Normal file
38
net-im/ejabberd/files/ejabberd-18.09-ejabberdctl.patch
Normal file
@@ -0,0 +1,38 @@
|
||||
Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
|
||||
|
||||
Set SHELL since the generic jabber user used on Gentoo for jabber
|
||||
servers doesn't have a valid shell set by default and fix EXEC_CMD
|
||||
otherwise it fails with This account is currently not available again
|
||||
due to jabber not having a valid shell.
|
||||
|
||||
Also, workaround the assumption that jabber's /root is a directory when
|
||||
instead it defaults to /dev/null on Gentoo.
|
||||
---
|
||||
|
||||
diff --git a/ejabberdctl.template b/ejabberdctl.template
|
||||
index 571b90b..71336c0 100755
|
||||
--- a/ejabberdctl.template
|
||||
+++ b/ejabberdctl.template
|
||||
@@ -82,6 +82,7 @@ fi
|
||||
ERL_LIBS={{libdir}}
|
||||
ERL_CRASH_DUMP="$LOGS_DIR"/erl_crash_$(date "+%Y%m%d-%H%M%S").dump
|
||||
ERL_INETRC="$ETC_DIR"/inetrc
|
||||
+HOME=$SPOOL_DIR
|
||||
|
||||
# define ejabberd parameters
|
||||
EJABBERD_OPTS="$EJABBERD_OPTS\
|
||||
@@ -105,12 +106,13 @@ export ERL_MAX_ETS_TABLES
|
||||
export CONTRIB_MODULES_PATH
|
||||
export CONTRIB_MODULES_CONF_DIR
|
||||
export ERL_LIBS
|
||||
+export HOME
|
||||
|
||||
# run command either directly or via su $INSTALLUSER
|
||||
exec_cmd()
|
||||
{
|
||||
case $EXEC_CMD in
|
||||
- as_install_user) su -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
|
||||
+ as_install_user) su -p -s /bin/sh -c '"$0" "$@"' "$INSTALLUSER" -- "$@" ;;
|
||||
as_current_user) "$@" ;;
|
||||
esac
|
||||
}
|
||||
5
net-im/ejabberd/files/ejabberd.confd
Normal file
5
net-im/ejabberd/files/ejabberd.confd
Normal file
@@ -0,0 +1,5 @@
|
||||
# Please configure everything at /etc/jabber/ejabberdctl.cfg
|
||||
# Put here only command line arguments for ejabberdctl (if any are required)
|
||||
|
||||
#EJABBERDCTL_OPTS=""
|
||||
|
||||
54
net-im/ejabberd/files/ejabberd.initd
Normal file
54
net-im/ejabberd/files/ejabberd.initd
Normal file
@@ -0,0 +1,54 @@
|
||||
#!/sbin/openrc-run
|
||||
# Copyright 1999-2018 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
depend() {
|
||||
use dns
|
||||
need epmd net
|
||||
provide jabber-server
|
||||
}
|
||||
|
||||
start() {
|
||||
if ejabberdctl status >/dev/null 2>&1; then
|
||||
ewarn "ejabberd is already started (manually?)."
|
||||
return 0
|
||||
fi
|
||||
ebegin "Starting ejabberd"
|
||||
/usr/sbin/ejabberdctl ${EJABBERDCTL_OPTS} start
|
||||
eend $?
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading ejabberd configuration"
|
||||
/usr/sbin/ejabberdctl ${EJABBERDCTL_OPTS} reload_config
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ejabberdctl status >/dev/null 2>&1
|
||||
if test $? = 3; then
|
||||
ewarn "ejabberd is already stopped (manually?)."
|
||||
return 0
|
||||
fi
|
||||
ebegin "Stopping ejabberd"
|
||||
if /usr/sbin/ejabberdctl stop >/dev/null 2>&1; then
|
||||
cnt=0
|
||||
sleep 1
|
||||
while ejabberdctl status >/dev/null 2>&1 || test $? = 1; do
|
||||
echo -n .
|
||||
cnt=`expr $cnt + 1`
|
||||
if [ $cnt -ge 60 ] ; then
|
||||
eend 1
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
eend 0
|
||||
else
|
||||
eend 1
|
||||
einfo "Please, run '/usr/sbin/ejabberdctl stop' to see what's going on."
|
||||
fi
|
||||
eend 0
|
||||
}
|
||||
13
net-im/ejabberd/files/ejabberd.logrotate
Normal file
13
net-im/ejabberd/files/ejabberd.logrotate
Normal file
@@ -0,0 +1,13 @@
|
||||
/var/log/jabber/*.log {
|
||||
su jabber jabber
|
||||
weekly
|
||||
rotate 4
|
||||
missingok
|
||||
nocreate
|
||||
sharedscripts
|
||||
notifempty
|
||||
compress
|
||||
postrotate
|
||||
/usr/sbin/ejabberdctl reopen-log > /dev/null 2>&1 || true
|
||||
endscript
|
||||
}
|
||||
2
net-im/ejabberd/files/ejabberd.tmpfiles.conf
Normal file
2
net-im/ejabberd/files/ejabberd.tmpfiles.conf
Normal file
@@ -0,0 +1,2 @@
|
||||
d /run/lock/ejabberdctl 0750 jabber jabber
|
||||
d /run/ejabberd 0750 jabber jabber
|
||||
21
net-im/ejabberd/files/epam-wrapper
Normal file
21
net-im/ejabberd/files/epam-wrapper
Normal file
@@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
ERL_LIBS=/usr/lib/erlang/lib
|
||||
|
||||
for bin in "$ERL_LIBS"/epam-*/priv/bin/epam; do
|
||||
if [ -x "$bin" ]; then
|
||||
if [ -z "$epam" ]; then
|
||||
epam="$bin"
|
||||
else
|
||||
echo "Multiple epam libraries - don't know what to do" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$epam" ]; then
|
||||
echo "Couldn't find epam package" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
exec "$epam"
|
||||
Reference in New Issue
Block a user