Created
March 19, 2014 19:27
-
-
Save heyimalex/9649374 to your computer and use it in GitHub Desktop.
fig upstart script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
description "fig service runner" | |
start on filesystem and started docker | |
stop on runlevel [!2345] | |
respawn | |
chdir /wherever/your/fig/file/is | |
script | |
# Wait for docker to finish starting up first. | |
FILE=/var/run/docker.sock | |
while [ ! -e $FILE ] ; do | |
inotifywait -t 2 -e create $(dirname $FILE) | |
done | |
/usr/local/bin/fig up | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment