qwen / entrypoint.sh
Qwer
Create entrypoint.sh
ae7d5bb verified
Raw
History Blame Contribute Delete
429 Bytes
#!/bin/sh
set -eu
mkdir -p /data
init_json_file() {
file_path="$1"
default_content="$2"
if [ ! -f "$file_path" ]; then
printf '%s\n' "$default_content" > "$file_path"
fi
}
init_json_file "${ACCOUNTS_FILE:-/data/accounts.json}" '[]'
init_json_file "${USERS_FILE:-/data/users.json}" '[]'
init_json_file "${CAPTURES_FILE:-/data/captures.json}" '[]'
init_json_file "${CONFIG_FILE:-/data/config.json}" '{}'
exec "$@"