I am using the below to sync my github repo in my chef recipe.
branch_name = "master"
git "/home/ubuntu/workspace/repo" do
repository "git@github.com:me/repo.git"
revision branch_name
action :sync
user "root"
end
In the repo is my python web.py script that runs my spawn-fcgi app . I am using the runit recipe to run my spawn-fcgi job.
include_recipe "runit"
runit_service "myservice"
Question is..given that the index.py script has been updated in the repo…how do I notify runit scipt myservice to reload my spawn-fcgi script?
If I understand correctly, this should reload the service after a git update:
The reload will be deferred until the end of your chef run. To make it happen immediately, you can change the last line to:
The runit_service definition does not support :reload as an operation. Note that this will restart the service any time the git version changes (and as such the local repo is updated). If you want to monitor only a single file, you would probably need to write a script or something to check for the updated file, but I suspect that any git change should restart.