free-games-claimer/keep-alive.sh
nocci 4ce50e2e43
All checks were successful
build-and-push / lint (push) Successful in 5s
build-and-push / sonar (push) Successful in 12s
build-and-push / docker (push) Successful in 1m10s
chore: add keep-alive helper script
2025-12-31 12:08:20 +00:00

11 lines
234 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
sleep_for=${KEEP_ALIVE_SECONDS:-86400}
echo "Keeping container alive (interval ${sleep_for}s). Press Ctrl+C to stop."
trap 'exit 0' TERM INT
while true; do
sleep "$sleep_for" &
wait $!
done