2026-07-12 20:22:15 +01:00

17 lines
273 B
Bash

#!/usr/bin/env bash
set -e
# If FLAG is set, write it to /app/flag.txt
if [ -n "$FLAG" ]; then
echo "$FLAG" > /app/flag.txt
chmod 644 /app/flag.txt
fi
case "${1:-}" in
local)
exec python3 server.py --mode stdin
;;
*)
exec python3 server.py
;;
esac