diff --git a/image/overlay/etc/init.d/bubble b/image/overlay/etc/init.d/bubble index 83222c4..87545fa 100755 --- a/image/overlay/etc/init.d/bubble +++ b/image/overlay/etc/init.d/bubble @@ -5,10 +5,10 @@ depend() { } supervisor="supervise-daemon" -restart_max=5 +restart_max=20 restart_delay=10 -command="/usr/bin/bubble" +command="/usr/bin/bubble-wrapper" command_args="-config /daemon/config.yaml 2>&1" pidfile="/run/${RC_SVCNAME}.pid" output_log="/data/bubble.log" -error_log="/data/bubble.err" \ No newline at end of file +error_log="/data/bubble.err" diff --git a/image/overlay/usr/bin/bubble-wrapper b/image/overlay/usr/bin/bubble-wrapper new file mode 100755 index 0000000..831d540 --- /dev/null +++ b/image/overlay/usr/bin/bubble-wrapper @@ -0,0 +1,8 @@ +#!/bin/sh + +if ! docker network inspect "workspace" ; then + sleep 1s; + exit 0 +fi + +/usr/bin/bubble "$@"