Trap errors in stop script in AWS, and put heroku back as a deploy ganet

This commit is contained in:
Martyn Inglis
2015-12-16 14:15:51 +00:00
parent 4a8f70b3b8
commit 4ffadc39c4
2 changed files with 20 additions and 2 deletions

View File

@@ -1,5 +1,15 @@
#!/bin/bash
function error_exit
{
echo "$1" 1>&2
exit 0
}
echo "Stopping application"
cd ~/notifications-admin/;
sudo service notifications-admin stop
if sudo service notifications-admin stop; then
exit 0
else
error_exit "Could not stop application"
fi