I have the following post-commit hook setup and running:
#!/bin/bash
/usr/bin/svn update /var/www/html/dev > /var/www/svnrepo/hooks/post-commit-log
I'm developing in Python/Django and whenever I make any changes to any ".py" file, I have to SSH in and "sudo /sbin/service httpd restart"... Is there a way to add this to the bottom of the post-commit file?
Some roadblocks I forsee and/or think:
- I'm serving my SVN repo from apache (e.g., http://www.iq-development.com/blog/creating_a_subversion_development_environment), so restarting it before the "confirmation" is sent back post-commit might cause some issues...
- I think the post-commit hook runs under "apache" for the user... Does this user have permissions to /sbin/service httpd restart?
-Fedora Core 8
Thanks! -Tom