Added git hook for restarting blogalba

This commit is contained in:
Matthew Connelly 2015-03-09 00:21:47 +00:00
parent 8f18bb6533
commit 731a2b1d0b
1 changed files with 4 additions and 0 deletions

4
git.hooks/post-receive Executable file
View File

@ -0,0 +1,4 @@
#!/bin/sh
cat > /dev/null
git --git-dir /home/sites/blogalba/.git --work-tree /home/sites/blogalba pull
[ ! -z "$(find /home/sites/blogalba -type d -name .git -prune -o -type f -mmin -1 -print|grep 'blogalba$')" ] && echo "Restarting blogalba" && /home/sites/blogalba/scripts/start