#!/bin/bash

set -e
set -o pipefail

if hash service 2> /dev/null; then
    service bitcore stop || echo "bitcore wasn't running!"
elif hash stop 2> /dev/null; then
    stop "$service_name" || echo "bitcore wasn't running!"
elif hash systemctl 2> /dev/null; then
    systemctl disable "bitcore.service" || echo "bitcore wasn't running!"
else
    echo "Your system does not appear to use upstart or systemd, so bitcore could not be stopped"
fi
