Files
Auto_Bangumi/docker/etc/services.d/auto_bangumi/run
2023-04-26 20:12:46 +08:00

16 lines
437 B
Plaintext

#!/usr/bin/with-contenv bash
# shellcheck shell=bash
umask ${UMASK}
if [ -f /app/config/config.json ]; then
AB_PORT=$(jq '.program.webui_port' /app/config/config.json)
elif [ -f /app/config/config_dev.json ]; then
AB_PORT=$(jq '.program.webui_port' /app/config/config_dev.json)
else
AB_PORT=7892
fi
exec \
s6-notifyoncheck -d -n 300 -w 1000 -c "nc -z localhost ${AB_PORT}" \
cd /app s6-setuidgid ab python3 main.py