kumquat-buildroot/package/ejabberd/0008-fix-ejabberdctl.patch
Johan Oudinet 1c5cc29e32 ejabberd: Bump to version 15.11
Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-01-16 14:09:42 +01:00

26 lines
849 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>
Index: ejabberd/ejabberdctl.template
===================================================================
diff --git a/ejabberdctl.template b/ejabberdctl.template
index c7d76ef..a7afce1 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -14,9 +14,12 @@ SCRIPT_DIR=`cd ${0%/*} && pwd`
ERL={{erl}}
IEX={{bindir}}/iex
EPMD={{bindir}}/epmd
-INSTALLUSER={{installuser}}
+INSTALLUSER=ejabberd
ERL_LIBS={{libdir}}
+# 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
EXEC_CMD="false"