diff --git a/examples/terraform/hetzner/gobetween.sh b/examples/terraform/hetzner/gobetween.sh index cd20b489d..a53bf382c 100755 --- a/examples/terraform/hetzner/gobetween.sh +++ b/examples/terraform/hetzner/gobetween.sh @@ -17,17 +17,20 @@ # This script is mostly used in CI # It installs dependencies and starts the tests -set -xe +set -euf -o pipefail + +GOBETWEEN_VERSION=0.7.0 mkdir /tmp/gobetween cd /tmp/gobetween -curl -L -o gobetween_0.7.0_linux_amd64.tar.gz \ - https://github.com/yyyar/gobetween/releases/download/0.7.0/gobetween_0.7.0_linux_amd64.tar.gz -tar xvf gobetween_0.7.0_linux_amd64.tar.gz -mv gobetween /usr/local/sbin/gobetween -chown root:root /usr/local/sbin/gobetween - -cat < /etc/systemd/system/gobetween.service +curl -L -o gobetween_${GOBETWEEN_VERSION}_linux_amd64.tar.gz \ + https://github.com/yyyar/gobetween/releases/download/${GOBETWEEN_VERSION}/gobetween_${GOBETWEEN_VERSION}_linux_amd64.tar.gz +tar xvf gobetween_${GOBETWEEN_VERSION}_linux_amd64.tar.gz +sudo mkdir -p /opt/bin +sudo mv gobetween /opt/bin/gobetween +sudo chown root:root /opt/bin/gobetween + +cat < /etc/systemd/system/gobetween.service +curl -L -o gobetween_${GOBETWEEN_VERSION}_linux_amd64.tar.gz \ + https://github.com/yyyar/gobetween/releases/download/${GOBETWEEN_VERSION}/gobetween_${GOBETWEEN_VERSION}_linux_amd64.tar.gz +tar xvf gobetween_${GOBETWEEN_VERSION}_linux_amd64.tar.gz +sudo mkdir -p /opt/bin +sudo mv gobetween /opt/bin/gobetween +sudo chown root:root /opt/bin/gobetween + +cat <