Del: default env value / Fix: #5

This commit is contained in:
2025-12-17 19:34:48 +09:00
parent ba868f2322
commit 7ae4c53a5a
4 changed files with 34 additions and 13 deletions
+23
View File
@@ -0,0 +1,23 @@
#!/bin/sh
set -e
# Check required env
if [ -z "$UWUZU_HOST" ] || [ -z "$UWUZU_TOKEN" ] ||
[ -z "$TWEET_ENABLED" ] || [ -z "$CHECK_INTERVAL" ] || [ -z "$THINK_OUTPUT_ENABLED" ]; then
echo "Error: The environment variable is not set"
exit 1
fi
# Create config.json
cat <<EOF > /app/config.json
{
"host": "${UWUZU_HOST}",
"api_token": "${UWUZU_TOKEN}",
"random_ueuse": ${TWEET_ENABLED},
"check_interval": ${CHECK_INTERVAL},
"rana_core_log": ${THINK_OUTPUT_ENABLED}
}
EOF
# Run
exec npm start