Last active
January 6, 2016 17:46
-
-
Save gordlea/515d449d7d8a60ea06aa to your computer and use it in GitHub Desktop.
weave autolaunch on trusty
This file contains hidden or 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
# scope - start weave after weave | |
# place under /etc/init/scope.conf | |
description "starts weave.scope" | |
author "Gord Lea <[email protected]>" | |
# Stanzas | |
# | |
# Stanzas control when and how a process is started and stopped | |
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas | |
start on started weave | |
stop on stopping weave | |
# Automatically restart process if crashed | |
respawn | |
# Essentially lets upstart know the process will detach itself to the background | |
# This option does not seem to be of great importance, so it does not need to be set. | |
expect fork | |
script | |
# modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) | |
SCOPE=/usr/local/bin/scope | |
exec "$SCOPE" launch | |
end script | |
pre-stop script | |
scope stop | |
end script |
This file contains hidden or 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
# put under /etc/default/weave | |
#WEAVE_HOSTS="10.0.0.159 10.0.0.122" |
This file contains hidden or 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
# weave - start weave after docker launches | |
# place under /etc/init/weave.conf | |
description "starts weave.net" | |
author "Gord Lea <[email protected]>" | |
# Stanzas | |
# | |
# Stanzas control when and how a process is started and stopped | |
# See a list of stanzas here: http://upstart.ubuntu.com/wiki/Stanzas | |
start on started docker | |
stop on stopping docker | |
# Automatically restart process if crashed | |
respawn | |
# Essentially lets upstart know the process will detach itself to the background | |
# This option does not seem to be of great importance, so it does not need to be set. | |
expect fork | |
pre-start script | |
weave stop | |
end script | |
script | |
# modify these in /etc/default/$UPSTART_JOB (/etc/default/docker) | |
WEAVE=/usr/local/bin/weave | |
WEAVE_HOSTS= | |
if [ -f /etc/default/$UPSTART_JOB ]; then | |
. /etc/default/$UPSTART_JOB | |
fi | |
exec "$WEAVE" launch $WEAVE_HOSTS | |
end script | |
pre-stop script | |
weave stop | |
end script |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment