From 2125055409938e0c62837b5fe6f0edc6d14e9e17 Mon Sep 17 00:00:00 2001 From: Gregory Colpart Date: Thu, 21 Feb 2019 02:31:04 +0100 Subject: [PATCH] Fix when multiples SetHandler lines in VHOST file --- scripts/web-add.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/web-add.sh b/scripts/web-add.sh index 44a0a46..5c0e93a 100755 --- a/scripts/web-add.sh +++ b/scripts/web-add.sh @@ -753,7 +753,7 @@ op_listvhost() { 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}') 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 is_enabled=1 else