diff --git a/scripts/install b/scripts/install index 5905512..3853b44 100755 --- a/scripts/install +++ b/scripts/install @@ -102,6 +102,13 @@ ynh_store_file_checksum --file="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" +#================================================== +# FIX PHP VERSION +#================================================== +ynh_script_progression --message="Fixing PHP version in package.json..." --weight=1 + +ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" + #================================================= # INSTALL THE CRON FILE #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index f88c8ef..6a9294e 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -114,6 +114,13 @@ ynh_store_file_checksum --file="$install_dir/.env" chmod 400 "$install_dir/.env" chown $app:$app "$install_dir/.env" +#================================================== +# FIX PHP VERSION +#================================================== +ynh_script_progression --message="Fixing PHP version in package.json..." --weight=1 + +ynh_replace_string --target_file="$install_dir/package.json" --match_string="php artisan lang:generate -vvv" --replace_string="php$phpversion artisan lang:generate -vvv" + #================================================= # INSTALL THE CRON FILE #=================================================