check of a laravel project before doing other things

This commit is contained in:
Ruben Momoa
2024-08-30 14:12:46 +02:00
parent be2d681161
commit e4e5dc6524

View File

@@ -3,6 +3,11 @@
# exit when any command fails
set -e
if [ ! -f /var/www/html/artisan ]; then
echo "No existing Laravel project found"
exit
fi
# install extra packages and extensions on first boot
if [[ $(id -u) -eq 0 && ! -f /etc/first_boot ]]; then
if [[ -n "${EXTRA_APK_PACKAGES// /}" ]]; then
@@ -26,11 +31,6 @@ if [[ "$BOOT_NPM_INSTALL" = true ]]; then
npm install --cache /tmp/npm
fi
if [ ! -f /var/www/html/artisan ]; then
echo "No existing Laravel project found"
exit
fi
if [[ "$BOOT_NPM_DEV" = true ]]; then
echo "Staring npm dev"
npm run dev --prefix /var/www/html &