github.com/outbrain/consul@v1.4.5/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