|
@@ -1,12 +1,12 @@
|
|
|
#!/bin/sh
|
|
|
|
|
|
-trap cleanup SIGTERM EXIT
|
|
|
+trap cleanup 0 1 2 3 6 15
|
|
|
|
|
|
cleanup()
|
|
|
{
|
|
|
echo Terminating $SERVICENAME
|
|
|
- docker stop $(docker ps -q -f label=ru.sdsys.subcontainer=$SERVICENAME)
|
|
|
- docker rm -f $(docker ps -q -f label=ru.sdsys.subcontainer=$SERVICENAME)
|
|
|
+# docker stop $(docker ps -q -f label=ru.sdsys.subcontainer=$SERVICENAME)
|
|
|
+ docker rm -f $(docker ps -a -q -f label=ru.sdsys.subcontainer=$SERVICENAME)
|
|
|
}
|
|
|
|
|
|
SERVICENAME=$(docker inspect $HOSTNAME -f "{{index .Config.Labels \"com.docker.swarm.service.name\"}}")
|