From ce75f79ee70af1b43beb1a00e5501dbdc5532cc3 Mon Sep 17 00:00:00 2001
From: Randy Barlow <randy@electronsweatshop.com>
Date: Thu, 1 Dec 2016 10:58:59 -0500
Subject: [PATCH] ejabberdctl should not try to create the ejabberd user's
home.
Also, explicitly use bash as the shell when using su to be the
ejabberd user.
---
ejabberdctl.template | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/ejabberdctl.template b/ejabberdctl.template
index 5b34ebe..00e4113 100755
--- a/ejabberdctl.template
+++ b/ejabberdctl.template
@@ -22,12 +22,7 @@ if [ "$INSTALLUSER" != "" ] ; then
EXEC_CMD="false"
for GID in `id -G`; do
if [ $GID -eq 0 ] ; then
- INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
- if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
- mkdir -p "$INSTALLUSER_HOME"
- chown "$INSTALLUSER" "$INSTALLUSER_HOME"
- fi
- EXEC_CMD="su $INSTALLUSER -c"
+ EXEC_CMD="su $INSTALLUSER -s /usr/bin/bash -c"
fi
done
if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
--
2.10.2