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>
|
2016-02-21 23:00:08 +01:00
|
|
|
---
|
|
|
|
ejabberdctl.template | 5 ++++-
|
|
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
2015-07-08 11:54:15 +02:00
|
|
|
|
|
|
|
diff --git a/ejabberdctl.template b/ejabberdctl.template
|
2016-02-21 23:00:09 +01:00
|
|
|
index f65c21f..ff9225f 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"
|
2016-02-21 23:00:08 +01:00
|
|
|
--
|
|
|
|
2.5.0
|
|
|
|
|