82acbf96ef
- add "a wait" when starting docker service to fix bsc#1019251 OBS-URL: https://build.opensuse.org/request/show/449885 OBS-URL: https://build.opensuse.org/package/show/Virtualization:containers/docker?expand=0&rev=163
23 lines
406 B
Bash
23 lines
406 B
Bash
#!/bin/bash
|
|
|
|
if [ "$1" != "wait" ];then
|
|
echo "Usage $0 option"
|
|
echo "options can be"
|
|
echo " wait: wait for the daemon to start"
|
|
exit -1
|
|
fi
|
|
|
|
echo "Waiting for docker daemon to start"
|
|
for i in {1..60};do
|
|
docker version > /dev/null 2>&1 && break
|
|
sleep 1
|
|
done
|
|
if docker version > /dev/null 2>&1;then
|
|
echo "Docker is alive"
|
|
exit 0
|
|
else
|
|
echo "Docker is dead"
|
|
exit 1
|
|
fi
|
|
|