Fix when multiples SetHandler lines in VHOST file

This commit is contained in:
Gregory Colpart 2019-02-21 02:31:04 +01:00
parent 6ba1fbcb6e
commit 2125055409

View file

@ -753,7 +753,7 @@ op_listvhost() {
quota_soft=$(quota --no-wrap --human-readable "$userid" |grep /home |awk '{print $3}') quota_soft=$(quota --no-wrap --human-readable "$userid" |grep /home |awk '{print $3}')
quota_hard=$(quota --no-wrap --human-readable "$userid" |grep /home |awk '{print $4}') quota_hard=$(quota --no-wrap --human-readable "$userid" |grep /home |awk '{print $4}')
fi fi
phpversion=$(perl -ne 'print $1 if (m!^\s+SetHandler proxy:unix:/home/.*/php-fpm(\d{2})\.sock!)' "$configfile") phpversion=$(perl -lne 'print $1 if (m!^\s+SetHandler proxy:unix:/home/.*/php-fpm(\d{2})\.sock!)' "$configfile" | head -n 1)
if [ -e /etc/apache2/sites-enabled/"${userid}".conf ]; then if [ -e /etc/apache2/sites-enabled/"${userid}".conf ]; then
is_enabled=1 is_enabled=1
else else