diff --git a/launch.sh b/launch.sh index 3a991fc..898c136 100644 --- a/launch.sh +++ b/launch.sh @@ -138,5 +138,15 @@ if [[ -n "$RCON_PASSWORD" ]]; then sed -i "s/rcon.port=.*/rcon.port=${RCON_PORT:-25575}/" server.properties fi + +# Start fulfillment daemon in background (only if SHOP_API_URL and RCON_PASSWORD are set) +if [[ -n "$SHOP_API_URL" ]] && [[ -n "$SHOP_API_KEY" ]] && [[ -n "$RCON_PASSWORD" ]]; then + echo "Starting fulfillment daemon..." + python3 /fulfillment.py >> /data/logs/fulfillment.log 2>&1 & +else + echo "Fulfillment daemon disabled (SHOP_API_URL, SHOP_API_KEY, or RCON_PASSWORD not set)" +fi + echo "Starting server..." exec ./run.sh nogui +