Skip to content

Commit 3f2fb11

Browse files
committed
Add TERM env variables
1 parent c1af87d commit 3f2fb11

File tree

1 file changed

+7
-2
lines changed
  • infrastructure/kctf/base/challenge-skeleton/healthcheck/exploit

1 file changed

+7
-2
lines changed

infrastructure/kctf/base/challenge-skeleton/healthcheck/exploit/run.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@ set -Eeuo pipefail
55
TIMEOUT=20
66
PERIOD=30
77

8+
export TERM=linux
9+
export TERMINFO=/etc/terminfo
10+
811
while true; do
912
source /config/env
13+
echo -n "[$(date)] "
1014
if timeout "${TIMEOUT}" /exploit/doit.py; then
11-
echo 'ok' > /tmp/healthz
15+
echo 'ok' | tee /tmp/healthz
1216
else
13-
echo 'err' > /tmp/healthz
17+
echo -n "$? "
18+
echo 'err' | tee /tmp/healthz
1419
fi
1520
sleep "${PERIOD}"
1621
done

0 commit comments

Comments
 (0)