Skip to content

Commit

Permalink
Add procps and handle sigterm in interactive bash execution
Browse files Browse the repository at this point in the history
  • Loading branch information
Tristan971 committed Nov 22, 2024
1 parent f477b4f commit 3c85f62
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ RUN apt -y update && \
apt -y install --no-install-recommends \
dnsutils \
jq \
procps \
vim && \
apt -y autoremove && \
rm -rf /var/cache/*
Expand Down
10 changes: 9 additions & 1 deletion scripts/watch-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,15 @@ for template_cluster_rline in $template_clusters_raw; do
done
echo ""

while true; do
wants_exit=false

function exit_next {
echo "Received exit signal. Exiting at the end of current loop."
wants_exit=true
}
trap exit_next SIGTERM

while ! $wants_exit; do
echo "checking clusters..."

workdir="$(mktemp -d)"
Expand Down

0 comments on commit 3c85f62

Please sign in to comment.