Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/processone/ejabberd.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBadlop <badlop@process-one.net>2018-03-21 01:37:42 +0300
committerBadlop <badlop@process-one.net>2018-03-21 01:39:07 +0300
commitb293e99aee0e7b468994200cf44828af0a7f57cb (patch)
tree3a0aea31728f8b07d089a3a21e0ee58806c925dd
parentb4b3ff50d6a1a1c07ec7c8b8a65657abf29f0c57 (diff)
Add option --enable-group=xxx (thanks to andreabenini)(#1429)
-rw-r--r--Makefile.in5
-rw-r--r--configure.ac13
2 files changed, 18 insertions, 0 deletions
diff --git a/Makefile.in b/Makefile.in
index 8557e51d2..3ebef18b9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -85,6 +85,11 @@ else
CHOWN_OUTPUT=&1
INIT_USER=$(INSTALLUSER)
endif
+# if no group was enabled, don't set privileges or ownership
+INSTALLGROUP=@INSTALLGROUP@
+ifneq ($(INSTALLGROUP),)
+ G_USER=-g $(INSTALLGROUP)
+endif
all: deps src
diff --git a/configure.ac b/configure.ac
index b4952a424..1fe20b6bc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -261,6 +261,19 @@ if test "$ENABLEUSER" != ""; then
echo "allow this system user to start ejabberd: $ENABLEUSER"
AC_SUBST([INSTALLUSER], [$ENABLEUSER])
fi
+ENABLEGROUP=""
+AC_ARG_ENABLE(group,
+ [AS_HELP_STRING([--enable-group[[[[=GROUP]]]]], [allow this system group to start ejabberd (default: no)])],
+ [case "${enableval}" in
+ yes) ENABLEGROUP=`groups |head -n 1` ;;
+ no) ENABLEGROUP="" ;;
+ *) ENABLEGROUP=$enableval
+ esac],
+ [])
+if test "$ENABLEGROUP" != ""; then
+ echo "allow this system group to start ejabberd: $ENABLEGROUP"
+ AC_SUBST([INSTALLGROUP], [$ENABLEGROUP])
+fi
ERLANG_DEPRECATED_TYPES_CHECK