Before Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 4.7 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 8.5 KiB |
Before Width: | Height: | Size: 229 KiB |
Before Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 4.8 KiB |
@ -1 +0,0 @@ |
|||
<!DOCTYPE html><html><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><title>Vue App</title><link href=/css/app.f160db62.css rel=preload as=style><link href=/css/chunk-vendors.b9dd8f74.css rel=preload as=style><link href=/js/app.51659839.js rel=preload as=script><link href=/js/chunk-vendors.f00828c9.js rel=preload as=script><link href=/css/chunk-vendors.b9dd8f74.css rel=stylesheet><link href=/css/app.f160db62.css rel=stylesheet></head><body><div id=app></div><script src=/js/chunk-vendors.f00828c9.js></script><script src=/js/app.51659839.js></script></body></html> |
@ -0,0 +1,23 @@ |
|||
#!/bin/bash |
|||
|
|||
nextip(){ |
|||
IP=$1 |
|||
IP_HEX=$(printf '%.2X%.2X%.2X%.2X\n' `echo $IP | sed -e 's/\./ /g'`) |
|||
NEXT_IP_HEX=$(printf %.8X `echo $(( 0x$IP_HEX + 1 ))`) |
|||
NEXT_IP=$(printf '%d.%d.%d.%d\n' `echo $NEXT_IP_HEX | sed -r 's/(..)/0x\1 /g'`) |
|||
echo "$NEXT_IP" |
|||
} |
|||
|
|||
for fint in $(docker ps --format '{{ .Names }}' | grep "^swarmlabwg-"); do |
|||
v=$(docker inspect --format '{{.HostConfig.NetworkMode}}' $fint) |
|||
ip=$(docker exec $fint /bin/sh -c "wg show $v allowed-ips | cut -f2 | cut -d'/' -f1") |
|||
IP=$(nextip $ip) |
|||
#echo " -- $fint --- $v -- $ip -- $IP" |
|||
if $(docker exec $fint /bin/sh -c "ping -q -w 2 $IP > /dev/null"); then |
|||
echo "ok:$fint" |
|||
else |
|||
docker stop $fint > /dev/null |
|||
docker container rm $fint > /dev/null |
|||
echo "stop:$fint" |
|||
fi |
|||
done |