#!/bin/sh

cd /var/www/html

if grep -qE '^HORIZON_ENABLED=false' .env 2>/dev/null; then
    echo "   INFO  Horizon is disabled, sleeping."
    exec sleep infinity
fi

echo "   INFO  Horizon is enabled, starting..."
exec php artisan horizon
