Skip to content

Commit

Permalink
Some minor doc updates (for #2)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jc2k committed Sep 11, 2014
1 parent 6d22f15 commit 9c36c57
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
6 changes: 2 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ You can write simple deployment scripts with Fabric by adding this to your fabfi
name='/var/local/minecraft',
)
yield Execute(
name='wget https://s3.amazonaws.com/Minecraft.Download/versions/1.6.2/minecraft_server.1.6.2.jar',
command='wget https://s3.amazonaws.com/Minecraft.Download/versions/1.8/minecraft_server.1.8.jar',
cwd="/var/local/minecraft",
creates="/var/local/minecraft/minecraft_server.1.6.2.jar",
creates="/var/local/minecraft/minecraft_server.1.8.jar",
)
yield File(
name='/var/local/minecraft/server.properties',
Expand All @@ -49,12 +49,10 @@ You can write simple deployment scripts with Fabric by adding this to your fabfi
contents=open("etc_systemd_system_minecraft.service"),
)
yield Execute(
name="systemctl-daemon-reload-minecraft",
command="systemctl daemon-reload",
watches=['/etc/systemd/system/minecraft.service'],
)
yield Execute(
name="systemctl-restart-minecraft",
command="systemctl restart minecraft.service",
watches=[
"/var/local/minecraft/server.properties",
Expand Down
5 changes: 0 additions & 5 deletions docs/defining_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ For example::
))

bundle.add(Execute(
name="install-requirements",
command="/var/sites/myapp/bin/pip install -r /usr/local/src/mycheckout/requirements.txt",
watches=['/usr/local/src/mycheckout'],
))
Expand All @@ -55,21 +54,18 @@ You can do the same for monitoring file changes too::
))

bundle.add(Execute(
name="restart-apache",
command="apache2ctl graceful",
watches=['/etc/apache2/security.conf'],
))

Sometimes you can't use ``File`` (perhaps ``buildout`` or ``maven`` or similar generates a config file for you), but you still want to trigger a command when a file changes during deployment::

bundle.add(Execute(
name="buildout",
command="buildout -c production.cfg",
changes=['/var/sites/mybuildout/parts/apache.cfg'],
))

bundle.add(Execute(
name="restart-apache",
command="apache2ctl graceful",
watches=['/var/sites/mybuildout/parts/apache.cfg'],
))
Expand All @@ -87,7 +83,6 @@ All of these examples use a trigger system. When a trigger has been set fuselage
))

bundle.add(Execute(
name="restart-apache2",
command="/etc/init.d/apache2 restart",
watches=['/etc/apache2/sites-enabled/mydemosite'],
))
Expand Down

0 comments on commit 9c36c57

Please sign in to comment.