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}