Files
mtusi2026lab7/scripts/compose-hook.sh
T
gamayunov2004 9fb7dde29b
Skeleton contracts / contracts (pull_request) Blocked by required conditions
ЛР 7: TLS, mTLS, OpenBao и безопасность — на 3
2026-11-22 06:03:17 +03:00

14 lines
350 B
Bash
Executable File

#!/bin/sh
set -eu
: "${LAB7_HOOK_DIR:?run through scripts/test-resilience.ps1}"
printf '%s\n' "$1" > "$LAB7_HOOK_DIR/request.tmp"
mv "$LAB7_HOOK_DIR/request.tmp" "$LAB7_HOOK_DIR/request"
for i in $(seq 1 85); do
if [ -f "$LAB7_HOOK_DIR/result" ]; then
test "$(cat "$LAB7_HOOK_DIR/result")" = 0
exit
fi
sleep 1
done
exit 1