open-consul/terraform/shared/scripts/service.sh
2016-07-05 17:11:52 -03:00

13 lines
242 B
Bash
Executable file

#!/usr/bin/env bash
set -e
echo "Starting Consul..."
if [ -x "$(command -v systemctl)" ]; then
echo "using systemctl"
sudo systemctl enable consul.service
sudo systemctl start consul
else
echo "using upstart"
sudo start consul
fi