mod_php_install.sh: some changes in script output.

This commit is contained in:
Christoph 2022-07-04 21:19:29 +02:00
parent a813cd3362
commit bad2958744

View File

@ -2510,7 +2510,7 @@ fi
#cp php.ini-production $PHP_INI_FILE || exit 1
[ -f $PHP_INI_FILE ] && cp -a $PHP_INI_FILE ${$PHP_INI_FILE}-$_backup_date
[[ -f $PHP_INI_FILE ]] && cp -a $PHP_INI_FILE ${PHP_INI_FILE}-$_backup_date
cp php.ini-production $PHP_INI_FILE || exit 1
## - Temporarily change PATH environment variable
@ -2519,15 +2519,28 @@ export PATH=/usr/local/php-${VERSION}/bin:$PATH
if ! $WITHOUT_APACHE_MOD_PHP ; then
_set_php_entries=""
echo ""
echo -n "do you want to set \"LoadModule\" entries in httpd.conf ? [y/n]: "
read _set_php_entries
if [ "y" = "$_set_php_entries" -o "Y" = "$_set_php_entries" -o "Yes" = "$_set_php_entries" -o "yes" = "$_set_php_entries" ];then
sed -i -r \
-e "s&(^\s*LoadModule php${PHP_MAJOR_VERSION}_module.*$)&\1\n<IfModule mod_php${PHP_MAJOR_VERSION}.c>\n AddType application/x-httpd-php .php\n AddType application/x-httpd-php-source .phps\n</IfModule>&" ${APACHE_BASEDIR}/conf/httpd.conf
#-e "s&(^\s*LoadModule php${PHP_MAJOR_VERSION}_module.*$)&\1\n<IfModule mod_php${PHP_MAJOR_VERSION}.c>\n AddType application/x-httpd-php .php .php5 .php4 .php3 .phtml\n AddType application/x-httpd-php-source .phps\n</IfModule>&" ${APACHE_BASEDIR}/conf/httpd.conf
#_set_php_entries=""
#echo ""
#echo -n "do you want to set \"LoadModule\" entries in httpd.conf ? [y/n]: "
#read _set_php_entries
#if [ "y" = "$_set_php_entries" -o "Y" = "$_set_php_entries" -o "Yes" = "$_set_php_entries" -o "yes" = "$_set_php_entries" ];then
#
# sed -i -r \
# -e "s&(^\s*LoadModule php${PHP_MAJOR_VERSION}_module.*$)&\1\n<IfModule mod_php${PHP_MAJOR_VERSION}.c>\n AddType application/x-httpd-php .php\n AddType application/x-httpd-php-source .phps\n</IfModule>&" ${APACHE_BASEDIR}/conf/httpd.conf
#
#
#fi
echononl "\tGoing to set \"LoadModule\" entries in httpd.conf .."
sed -i -r \
-e "s&(^\s*LoadModule php${PHP_MAJOR_VERSION}_module.*$)&\1\n<IfModule mod_php${PHP_MAJOR_VERSION}.c>\n AddType application/x-httpd-php .php\n AddType application/x-httpd-php-source .phps\n</IfModule>&" ${APACHE_BASEDIR}/conf/httpd.conf
if [ "$?" = "0" ]; then
echo_ok
else
echo_failed
fi
fi
echo ""
@ -4691,19 +4704,21 @@ if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \
echo_ok
else
echo_failed
cho ""
echo ""
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
echo ""
failed=true
error "For more details see '${_logdir}/pecl_install.log'.. "
#echo ""
#echononl "continue anyway [yes/no]: "
#read OK
#OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
#while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
# echononl "Wrong entry! - repeat [yes/nno]: "
# read OK
#done
#[[ $OK = "yes" ]] || fatal "Abbruch durch User"
#echo ""
_failed=true
fi
fi
if ! $_failed ; then
@ -4719,18 +4734,20 @@ if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \
else
echo_failed
echo ""
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
echo ""
error "For more details see '${_logdir}/pecl_install.log'.. "
failed=true
#echo ""
#echononl "continue anyway [yes/no]: "
#read OK
#OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
#while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
# echononl "Wrong entry! - repeat [yes/nno]: "
# read OK
#done
#[[ $OK = "yes" ]] || fatal "Abbruch durch User"
#echo ""
_failed=true
fi
fi
if ! $_failed ; then
@ -4746,18 +4763,20 @@ if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \
else
echo_failed
echo ""
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
echo ""
error "For more details see '${_logdir}/pecl_install.log'.. "
failed=true
#echo ""
#echononl "continue anyway [yes/no]: "
#read OK
#OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
#while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
# echononl "Wrong entry! - repeat [yes/nno]: "
# read OK
#done
#[[ $OK = "yes" ]] || fatal "Abbruch durch User"
#echo ""
_failed=true
fi
fi
if ! $_failed ; then
@ -4773,18 +4792,20 @@ if ([[ "$PHP_MAJOR_VERSION" -eq 7 ]] && [[ "$PHP_MINOR_VERSION" -ge 4 ]]) \
else
echo_failed
echo ""
echononl "continue anyway [yes/no]: "
read OK
OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
echononl "Wrong entry! - repeat [yes/nno]: "
read OK
done
[[ $OK = "yes" ]] || fatal "Abbruch durch User"
echo ""
error "For more details see '${_logdir}/pecl_install.log'.. "
failed=true
#echo ""
#echononl "continue anyway [yes/no]: "
#read OK
#OK="$(echo "$OK" | tr '[:upper:]' '[:lower:]')"
#while [[ "$OK" != "yes" ]] && [[ "$OK" != "no" ]] ; do
# echononl "Wrong entry! - repeat [yes/nno]: "
# read OK
#done
#[[ $OK = "yes" ]] || fatal "Abbruch durch User"
#echo ""
_failed=true
fi
fi
rm -rf /tmp/pecl-text-wddx