From 18e034df8a44eee88812a1923ef4c20bba249486 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sat, 18 Feb 2023 16:34:54 +0100 Subject: [PATCH] regenconf: in apt/php stuff, don't try to upgrade-alternatives if the default PHP version ain't available anymore (similar to commit e24ddd29) --- hooks/conf_regen/10-apt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hooks/conf_regen/10-apt b/hooks/conf_regen/10-apt index bdd6d399c..a28a869ab 100755 --- a/hooks/conf_regen/10-apt +++ b/hooks/conf_regen/10-apt @@ -68,7 +68,10 @@ do_post_regen() { fi # Make sure php7.4 is the default version when using php in cli - update-alternatives --set php /usr/bin/php7.4 + if test -e /usr/bin/php$YNH_DEFAULT_PHP_VERSION + then + update-alternatives --set php /usr/bin/php$YNH_DEFAULT_PHP_VERSION + fi } do_$1_regen ${@:2}