Fix missing HTTP_User in case of debian apache2 package is installed.
This commit is contained in:
parent
7924ad23e6
commit
d42212df9d
@ -373,6 +373,10 @@ if dpkg -l apache2 2> /dev/null | grep -e "^ii" > /dev/null 2>&1 ; then
|
|||||||
fatal "Something went wron with your Apache Installation"
|
fatal "Something went wron with your Apache Installation"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
_httpd_binary=/usr/sbin/apache2
|
||||||
|
HTTPD_USER="$($_httpd_binary -t -D DUMP_RUN_CFG | grep -i -e "^User" | awk '{print$2}' | cut -d"=" -f2 | tr -d '"')"
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
## - Determin httpd binary
|
## - Determin httpd binary
|
||||||
@ -394,6 +398,7 @@ else
|
|||||||
web_group="`$_httpd_binary -t -D DUMP_RUN_CFG | grep -i -e "^Group" | awk '{print$2}' | cut -d\"=\" -f2 | tr -d '"'`"
|
web_group="`$_httpd_binary -t -D DUMP_RUN_CFG | grep -i -e "^Group" | awk '{print$2}' | cut -d\"=\" -f2 | tr -d '"'`"
|
||||||
if [ -z "$web_user" -o -z "$web_group" ]; then
|
if [ -z "$web_user" -o -z "$web_group" ]; then
|
||||||
HTTPD_USER=www-data
|
HTTPD_USER=www-data
|
||||||
|
HTTPD_GROUP=www-data
|
||||||
else
|
else
|
||||||
HTTPD_USER=$web_user
|
HTTPD_USER=$web_user
|
||||||
HTTPD_GROUP=$web_group
|
HTTPD_GROUP=$web_group
|
||||||
@ -1325,19 +1330,24 @@ echo "Use systemd.....................: $SYSTEMD_SUPPORTED"
|
|||||||
if $SYSTEMD_SUPPORTED ; then
|
if $SYSTEMD_SUPPORTED ; then
|
||||||
echo "Directory Systemd unit files....: $SYMPA_SYSTEMD_DIR"
|
echo "Directory Systemd unit files....: $SYMPA_SYSTEMD_DIR"
|
||||||
fi
|
fi
|
||||||
if ! $UPDATE_SYMPA ; then
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "Apache VHost directory..........: $apache_vhost_dir"
|
|
||||||
echo "Apache Log Directory............: $apache_log_dir"
|
|
||||||
echo "IPv4 Address....................: $IPv4"
|
echo "IPv4 Address....................: $IPv4"
|
||||||
echo "IPv6 Address....................: $IPv6"
|
echo "IPv6 Address....................: $IPv6"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo "Apache User.....................: $HTTPD_USER"
|
||||||
|
if ! $UPDATE_SYMPA ; then
|
||||||
|
echo "Apache VHost directory..........: $apache_vhost_dir"
|
||||||
|
echo "Apache Log Directory............: $apache_log_dir"
|
||||||
|
echo ""
|
||||||
echo "Postfix Configuration Directory.: $POSTFIX_CONF_DIR"
|
echo "Postfix Configuration Directory.: $POSTFIX_CONF_DIR"
|
||||||
fi
|
fi
|
||||||
if $UPDATE_SYMPA ; then
|
if $UPDATE_SYMPA ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo -e "-- \033[34m\033[1mSome determined defines of the installed Sympa System\033[m --"
|
echo -e "-- \033[34m\033[1mSome determined defines of the installed Sympa System\033[m --"
|
||||||
echo ""
|
echo ""
|
||||||
|
echo " Apache VHost directory..........: $apache_vhost_dir"
|
||||||
|
echo " Apache Log Directory............: $apache_log_dir"
|
||||||
|
echo ""
|
||||||
echo " (default) domain..................: $SYMPA_DOMAIN"
|
echo " (default) domain..................: $SYMPA_DOMAIN"
|
||||||
echo " Listmaster........................: $SYMPA_LISTMASTER"
|
echo " Listmaster........................: $SYMPA_LISTMASTER"
|
||||||
echo " URL for web interface.............: $SYMPA_WEB_URL"
|
echo " URL for web interface.............: $SYMPA_WEB_URL"
|
||||||
@ -1475,17 +1485,22 @@ if $SYSTEMD_SUPPORTED ; then
|
|||||||
echo "## - Directory Systemd unit files......: $SYMPA_SYSTEMD_DIR" >> $_log_file
|
echo "## - Directory Systemd unit files......: $SYMPA_SYSTEMD_DIR" >> $_log_file
|
||||||
fi
|
fi
|
||||||
echo "## -" >> $_log_file
|
echo "## -" >> $_log_file
|
||||||
|
echo "## - IPv4 Address....................: $IPv4" >> $_log_file
|
||||||
|
echo "## - IPv6 Address....................: $IPv6" >> $_log_file
|
||||||
|
echo "## - " >> $_log_file
|
||||||
|
echo "## - Apache User.....................: $HTTPD_USER" >> $_log_file
|
||||||
if ! $UPDATE_SYMPA ; then
|
if ! $UPDATE_SYMPA ; then
|
||||||
echo "## - Apache VHost directory............: $apache_vhost_dir" >> $_log_file
|
echo "## - Apache VHost directory............: $apache_vhost_dir" >> $_log_file
|
||||||
echo "## - Apache Log Directory..............: $apache_log_dir" >> $_log_file
|
echo "## - Apache Log Directory..............: $apache_log_dir" >> $_log_file
|
||||||
echo "## - IPv4 Address......................: $IPv4" >> $_log_file
|
|
||||||
echo "## - IPv6 Address......................: $IPv6" >> $_log_file
|
|
||||||
echo "## -" >> $_log_file
|
echo "## -" >> $_log_file
|
||||||
echo "## - Postfix Configuration Directory...: $POSTFIX_CONF_DIR" >> $_log_file
|
echo "## - Postfix Configuration Directory...: $POSTFIX_CONF_DIR" >> $_log_file
|
||||||
fi
|
fi
|
||||||
if $UPDATE_SYMPA ; then
|
if $UPDATE_SYMPA ; then
|
||||||
echo "## --- Some determined defines of the installed Sympa System" >> $_log_file
|
echo "## --- Some determined defines of the installed Sympa System" >> $_log_file
|
||||||
echo "## -" >> $_log_file
|
echo "## -" >> $_log_file
|
||||||
|
echo "## - Apache VHost directory.........: $apache_vhost_dir" >> $_log_file
|
||||||
|
echo "## - Apache Log Directory...........: $apache_log_dir" >> $_log_file
|
||||||
|
echo "## -" >> $_log_file
|
||||||
echo "## - (default) domain...............: $SYMPA_DOMAIN" >> $_log_file
|
echo "## - (default) domain...............: $SYMPA_DOMAIN" >> $_log_file
|
||||||
echo "## - Listmaster.....................: $SYMPA_LISTMASTER" >> $_log_file
|
echo "## - Listmaster.....................: $SYMPA_LISTMASTER" >> $_log_file
|
||||||
echo "## - URL for web interface..........: $SYMPA_WEB_URL" >> $_log_file
|
echo "## - URL for web interface..........: $SYMPA_WEB_URL" >> $_log_file
|
||||||
@ -1555,12 +1570,12 @@ if $SYSTEMD_SUPPORTED ; then
|
|||||||
echo "SYMPA_SYSTEMD_DIR=$SYMPA_SYSTEMD_DIR" >> $_log_file
|
echo "SYMPA_SYSTEMD_DIR=$SYMPA_SYSTEMD_DIR" >> $_log_file
|
||||||
fi
|
fi
|
||||||
echo "" >> $_log_file
|
echo "" >> $_log_file
|
||||||
if ! $UPDATE_SYMPA ; then
|
|
||||||
echo "apache_vhost_dir=$apache_vhost_dir" >> $_log_file
|
echo "apache_vhost_dir=$apache_vhost_dir" >> $_log_file
|
||||||
echo "apache_log_dir=$apache_log_dir" >> $_log_file
|
echo "apache_log_dir=$apache_log_dir" >> $_log_file
|
||||||
|
echo "HTTPD_USER=$HTTPD_USER" >> $_log_file
|
||||||
|
echo "" >> $_log_file
|
||||||
echo "IPv4=$IPv4" >> $_log_file
|
echo "IPv4=$IPv4" >> $_log_file
|
||||||
echo "IPv6=$IPv6" >> $_log_file
|
echo "IPv6=$IPv6" >> $_log_file
|
||||||
fi
|
|
||||||
echo "" >> $_log_file
|
echo "" >> $_log_file
|
||||||
if ! $UPDATE_SYMPA ; then
|
if ! $UPDATE_SYMPA ; then
|
||||||
echo "POSTFIX_CONF_DIR=$POSTFIX_CONF_DIR" >> $_log_file
|
echo "POSTFIX_CONF_DIR=$POSTFIX_CONF_DIR" >> $_log_file
|
||||||
|
Loading…
Reference in New Issue
Block a user