fulfillment: start daemon in background if SHOP_API_URL/SHOP_API_KEY/RCON_PASSWORD set

This commit is contained in:
kayos 2026-03-06 01:07:35 -08:00
parent dc7f8fcd7e
commit ccb66d2cb1

View file

@ -138,5 +138,15 @@ if [[ -n "$RCON_PASSWORD" ]]; then
sed -i "s/rcon.port=.*/rcon.port=${RCON_PORT:-25575}/" server.properties sed -i "s/rcon.port=.*/rcon.port=${RCON_PORT:-25575}/" server.properties
fi 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..." echo "Starting server..."
exec ./run.sh nogui exec ./run.sh nogui