#!/bin/bash

for colour in blue green
do
    echo "Stopping $1-$2-$colour"
    sudo service $1-$2-$colour stop

    sleep 5

    systemctl is-active $1-$2-$colour --quiet
    if [ $? != 0 ]
    then
        echo "$1-$2-$colour service is stopped"
    else
        echo "Unable to stop $1-$2-$colour service"
    fi;
done

