kumquat-buildroot/package/ejabberd/0008-fix-ejabberdctl.patch
Johan Oudinet 274e5f6731 ejabberd: bump to version 15.09
Remove patches that have been applied upstream and adapt the other
ones.

Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-10-13 21:21:05 +02:00

22 lines
702 B
Diff

Description: fix ejabberdctl
Change default values so ejabberdctl run commands as ejabberd user
Also add a way for the user to change default values.
Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
diff --git a/ejabberdctl.template b/ejabberdctl.template
index 79f4438..df0abba 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -14,7 +14,10 @@ SCRIPT_DIR=`cd ${0%/*} && pwd`
ERL={{erl}}
IEX={{bindir}}/iex
EPMD={{bindir}}/epmd
-INSTALLUSER={{installuser}}
+INSTALLUSER=ejabberd
+
+# Read default configuration file if present.
+[ ! -r /etc/default/ejabberd ] || . /etc/default/ejabberd
# check the proper system user is used if defined
if [ "$INSTALLUSER" != "" ] ; then