1#!/usr/bin/env bash 2set -e 3 4echo "Starting Consul..." 5if [ -x "$(command -v systemctl)" ]; then 6 echo "using systemctl" 7 sudo systemctl enable consul.service 8 sudo systemctl start consul 9else 10 echo "using upstart" 11 sudo start consul 12fi 13