2015-07-08 11:54:15 +02:00
|
|
|
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>
|
|
|
|
|
2016-01-11 17:26:15 +01:00
|
|
|
Index: ejabberd/ejabberdctl.template
|
|
|
|
===================================================================
|
2015-07-08 11:54:15 +02:00
|
|
|
diff --git a/ejabberdctl.template b/ejabberdctl.template
|
2016-01-11 17:26:15 +01:00
|
|
|
index c7d76ef..a7afce1 100755
|
2015-07-08 11:54:15 +02:00
|
|
|
--- a/ejabberdctl.template
|
|
|
|
+++ b/ejabberdctl.template
|
2016-01-11 17:26:15 +01:00
|
|
|
@@ -14,9 +14,12 @@ SCRIPT_DIR=`cd ${0%/*} && pwd`
|
2015-07-08 11:54:15 +02:00
|
|
|
ERL={{erl}}
|
|
|
|
IEX={{bindir}}/iex
|
|
|
|
EPMD={{bindir}}/epmd
|
|
|
|
-INSTALLUSER={{installuser}}
|
|
|
|
+INSTALLUSER=ejabberd
|
2016-01-11 17:26:15 +01:00
|
|
|
ERL_LIBS={{libdir}}
|
2015-07-08 11:54:15 +02:00
|
|
|
|
2016-01-11 17:26:15 +01:00
|
|
|
+# Read default configuration file if present
|
|
|
|
+[ ! -r /etc/default/ejabberd ] || . /etc/default/ejabberd
|
|
|
|
+
|
2015-07-08 11:54:15 +02:00
|
|
|
# check the proper system user is used if defined
|
|
|
|
if [ "$INSTALLUSER" != "" ] ; then
|
2016-01-11 17:26:15 +01:00
|
|
|
EXEC_CMD="false"
|