2016-02-21 23:00:09 +01:00
|
|
|
From 53d7d654026afa163a55b860e33c6901129e8dc1 Mon Sep 17 00:00:00 2001
|
2016-02-21 23:00:08 +01:00
|
|
|
From: Johan Oudinet <johan.oudinet@gmail.com>
|
2016-02-21 23:00:09 +01:00
|
|
|
Date: Wed, 20 Jan 2016 09:35:07 -0500
|
2016-02-21 23:00:08 +01:00
|
|
|
Subject: [PATCH] fix ejabberdctl
|
|
|
|
|
|
|
|
Change default values so ejabberdctl run commands as ejabberd user
|
|
|
|
Also add a way for the user to change default values.
|
|
|
|
|
2015-07-08 11:54:15 +02:00
|
|
|
Signed-off-by: Johan Oudinet <johan.oudinet@gmail.com>
|
|
|
|
|
|
|
|
diff --git a/ejabberdctl.template b/ejabberdctl.template
|
2017-06-06 16:33:11 +02:00
|
|
|
index 5b34ebee..51acaca8 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
|
2017-06-06 16:33:11 +02:00
|
|
|
EPMD={{epmd}}
|
2015-07-08 11:54:15 +02:00
|
|
|
-INSTALLUSER={{installuser}}
|
|
|
|
+INSTALLUSER=ejabberd
|
2016-01-11 17:26:15 +01:00
|
|
|
ERL_LIBS={{libdir}}
|
2017-06-06 16:33:11 +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"
|