25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

Add option --enable-group=xxx (thanks to andreabenini)(#1429)

This commit is contained in:
Badlop 2018-03-20 23:37:42 +01:00
parent b4b3ff50d6
commit b293e99aee
2 changed files with 18 additions and 0 deletions

View File

@ -85,6 +85,11 @@ else
CHOWN_OUTPUT=&1 CHOWN_OUTPUT=&1
INIT_USER=$(INSTALLUSER) INIT_USER=$(INSTALLUSER)
endif endif
# if no group was enabled, don't set privileges or ownership
INSTALLGROUP=@INSTALLGROUP@
ifneq ($(INSTALLGROUP),)
G_USER=-g $(INSTALLGROUP)
endif
all: deps src all: deps src

View File

@ -261,6 +261,19 @@ if test "$ENABLEUSER" != ""; then
echo "allow this system user to start ejabberd: $ENABLEUSER" echo "allow this system user to start ejabberd: $ENABLEUSER"
AC_SUBST([INSTALLUSER], [$ENABLEUSER]) AC_SUBST([INSTALLUSER], [$ENABLEUSER])
fi 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 ERLANG_DEPRECATED_TYPES_CHECK