Skip to content
Snippets Groups Projects
Commit 0907750c authored by Pierre Ozoux's avatar Pierre Ozoux
Browse files

Increases ttl

parent 01eae220
No related branches found
No related tags found
No related merge requests found
...@@ -21,11 +21,11 @@ ExecStart=/bin/bash -c '\ ...@@ -21,11 +21,11 @@ ExecStart=/bin/bash -c '\
ip=`docker inspect --format \'{{.NetworkSettings.IPAddress}}\' $app-%i`; \ ip=`docker inspect --format \'{{.NetworkSettings.IPAddress}}\' $app-%i`; \
curl -f $ip; \ curl -f $ip; \
if [ $? -eq 0 ]; then \ if [ $? -eq 0 ]; then \
etcdctl set /services/$app/%i \'{"ip":"\'$ip\'", "port":"80"}\' --ttl 30; \ etcdctl set /services/$app/%i \'{"ip":"\'$ip\'", "port":"80"}\' --ttl 60; \
else \ else \
etcdctl rm /services/$app/%i; \ etcdctl rm /services/$app/%i; \
fi; \ fi; \
sleep 20; \ sleep 50; \
done' done'
# Stop # Stop
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment