Commit 08553534 authored by nanamicat's avatar nanamicat

docker

parent d6a5273f
#!/bin/bash
pid=0
down=$(echo "$1" | jq -r '.routers | .[].down')
echo "$down"
run_stop() {
signalCode=$1
if [ -n "$DOWN_SCRIPT" ]; then
eval "$DOWN_SCRIPT"
if [ -n "$down" ]; then
eval "$down"
fi
if [ $pid -ne 0 ]; then
kill "-$signalCode" "$pid"
......@@ -17,7 +18,7 @@ run_stop() {
trap 'kill ${!}; run_stop 2' SIGTERM
trap 'kill ${!}; run_stop 15' SIGINT
"$@" &
tun "$@" &
pid="$!"
# wait forever
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment