mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-18 08:02:31 -05:00
Adding an error trap - if application fails top stop build fails
This commit is contained in:
@@ -1,4 +1,15 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
|
||||||
|
function error_exit
|
||||||
|
{
|
||||||
|
echo "$1" 1>&2
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
echo "Stopping application"
|
echo "Stopping application"
|
||||||
sudo service notifications-api stop
|
if sudo service notifications-api stop; then
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
error_exit "Could not stop application"
|
||||||
|
fi
|
||||||
Reference in New Issue
Block a user