diff --git a/laravalcache.sh b/laravalcache.sh index 461ee6d35..ae5bf1670 100755 --- a/laravalcache.sh +++ b/laravalcache.sh @@ -23,7 +23,7 @@ COMMANDS=( "chown -R www-data:www-data storage bootstrap/cache && chmod -R 775 storage bootstrap/cache" "php artisan package:discover --ansi" "php artisan optimize" - "pkill -f 'artisan queue:work' >/dev/null 2>&1 || true; nohup php artisan queue:work --daemon --quiet >> /dev/null 2>&1 &" + "(php artisan queue:restart --quiet || true; sleep 1; if ! pgrep -f 'artisan queue:work' >/dev/null 2>&1; then nohup php artisan queue:work --daemon --quiet >> /dev/null 2>&1 & fi; true)" "(command -v php >/dev/null 2>&1 && php -r 'if(function_exists(\"opcache_reset\")) opcache_reset();') || true" )