This commit is contained in:
pwn
2025-12-05 11:14:59 +03:00
parent 376d0fc8ad
commit b79ef3a3f3
8 changed files with 35 additions and 18 deletions

View File

@@ -1,9 +1,14 @@
#!/bin/sh
set -euo pipefail
# Ensure the ctf user exists (defensive in case the base image changes)
if ! id ctf >/dev/null 2>&1; then
useradd -m -u 1001 ctf
fi
# Ensure the history directory exists and has correct ownership
mkdir -p /app/history
chown -R ctf:ctf /app/history
# Run the grob service as ctf user
exec runuser -u ctf /app/grob
exec runuser -u ctf -- /app/grob