new startup for cobald containers

This commit is contained in:
2021-06-17 14:55:21 +02:00
parent cc43a39ea3
commit 6eb6984d6a
10 changed files with 102 additions and 33 deletions

View File

@@ -0,0 +1,18 @@
#!/bin/bash
function trp_term(){
echo pkill -P $pids
for j in $pids ; do
pkill -P $j
kill -SIGTERM $j
done
}
trap trp_term SIGINT SIGTERM
pids=""
for i in /etc/docker-init.d/* ; do
[ ! -f $i ] && break
$i &
pids="$pids $!"
done
wait $pids
# TODO: call start scripts like "foo.sh start" and "foo.sh stop" to avoid pkill