diff --git a/gitpull.sh b/gitpull.sh index f0f921388..2d80c8f16 100755 --- a/gitpull.sh +++ b/gitpull.sh @@ -14,12 +14,11 @@ OLD_HEAD=$(git rev-parse HEAD 2>/dev/null || echo "") STEPS=( "Pull latest code" "Maintenance mode" - "Restart PHP-FPM" "Clear caches" "Optimize app" "Set permissions" "Ensure queue running" - "Reset OPcache" + "Restart PHP-FPM" "Bring app online" "Check php-fpm" "Check paymenter" @@ -28,12 +27,11 @@ STEPS=( CMDS=( "git pull --rebase --autostash --quiet" "php artisan down --render='errors::503' --retry=60 --quiet || true" - "systemctl restart php8.3-fpm.service" "php artisan optimize:clear --quiet" "php artisan optimize --quiet" "find storage bootstrap/cache -not -perm 775 -type d -exec chmod 775 {} + -o -not -perm 664 -type f -exec chmod 664 {} +; chown -R www-data:www-data storage bootstrap/cache" "if ! pgrep -f 'artisan queue:work' >/dev/null; then nohup php artisan queue:work --daemon --quiet >> /dev/null 2>&1 & fi" - "php -r 'if(function_exists(\"opcache_reset\")) opcache_reset();' 2>/dev/null || true" + "systemctl restart php8.3-fpm.service" "php artisan up --quiet" "systemctl is-active --quiet php8.3-fpm || systemctl restart php8.3-fpm" "systemctl is-active --quiet paymenter.service || systemctl restart paymenter.service"