2016-09-20 11:49:01 +01:00
|
|
|
#!/usr/bin/env bash
|
2015-12-15 16:26:56 +00:00
|
|
|
|
2016-09-20 11:49:01 +01:00
|
|
|
set -eo pipefail
|
2015-12-16 13:20:55 +00:00
|
|
|
|
2016-09-20 11:49:01 +01:00
|
|
|
function stop
|
2015-12-16 13:20:55 +00:00
|
|
|
{
|
2016-09-20 11:49:01 +01:00
|
|
|
service=$1
|
|
|
|
|
if [ -e "/etc/init/${service}.conf" ]; then
|
|
|
|
|
echo "stopping ${service}"
|
|
|
|
|
if service ${service} stop; then
|
|
|
|
|
echo "${service} stopped"
|
2016-08-31 11:40:47 +01:00
|
|
|
else
|
2016-09-20 11:49:01 +01:00
|
|
|
>&2 echo "Could not stop ${service}"
|
2016-08-31 11:40:47 +01:00
|
|
|
fi
|
2016-09-20 11:49:01 +01:00
|
|
|
fi
|
|
|
|
|
}
|
2016-08-31 11:40:47 +01:00
|
|
|
|
2016-09-20 11:49:01 +01:00
|
|
|
stop "notifications-api"
|
|
|
|
|
stop "notifications-api-celery-beat"
|
|
|
|
|
stop "notifications-api-celery-worker"
|
|
|
|
|
stop "notifications-api-celery-worker-sender"
|
2016-09-30 11:25:12 +01:00
|
|
|
stop "notifications-api-celery-worker-research"
|
2016-09-20 11:49:01 +01:00
|
|
|
stop "notifications-api-celery-worker-db"
|