check file exists before removing

This commit is contained in:
Eugene Ware
2013-07-08 15:07:41 +10:00
parent 1f4dab1fd8
commit 6c6196fd5a

View File

@@ -12,7 +12,7 @@ start on runlevel [2345]
stop on runlevel [!2345]
script
rm -rf /home/git/reload-nginx
[[ -f /home/git/reload-nginx ]] && rm -rf /home/git/reload-nginx
echo | sudo -u git nc -l -U /home/git/reload-nginx && /etc/init.d/nginx reload
end script
respawn