mirror of
https://github.com/kasmtech/kasm-workspaces-dind.git
synced 2026-01-23 02:35:11 +00:00
add ability to kill off wizard and use sigterm to try to stop containers properly
This commit is contained in:
parent
6d025db119
commit
7d6d001436
2 changed files with 16 additions and 0 deletions
|
|
@ -1,3 +1,14 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
|
||||
_term() {
|
||||
if [ -f "/opt/kasm/bin/stop" ]; then
|
||||
echo "Caught SIGTERM signal!"
|
||||
echo "Stopping Kasm Containers"
|
||||
/opt/kasm/bin/stop
|
||||
pid=$(pidof stop)
|
||||
# terminate when the stop process dies
|
||||
tail --pid=${pid} -f /dev/null
|
||||
fi
|
||||
}
|
||||
|
||||
exec /usr/local/bin/dockerd-entrypoint.sh -l error --data-root /opt/docker
|
||||
|
|
|
|||
|
|
@ -8,5 +8,10 @@ while true; do
|
|||
sleep 1
|
||||
done
|
||||
|
||||
# Don't do anything if wizard is disabled
|
||||
if [ -f "/opt/NO_WIZARD" ]; then
|
||||
sleep infinity
|
||||
fi
|
||||
|
||||
cd /wizard
|
||||
/usr/bin/node index.js
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue