regenconf: in apt/php stuff, don't try to upgrade-alternatives if the default PHP version ain't available anymore (similar to commit e24ddd29)

This commit is contained in:
Alexandre Aubin 2023-02-18 16:34:54 +01:00
parent 8a43b04614
commit 18e034df8a

View file

@ -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}