github.com/Aestek/consul@v1.2.4-0.20190309222502-b2c31e33971a/terraform/shared/scripts/service.sh (about)

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