Skip to content

Instantly share code, notes, and snippets.

@puittenbroek
Last active March 10, 2026 14:51
Show Gist options
  • Select an option

  • Save puittenbroek/eaee039409e7fa59969ffc7cd062b02e to your computer and use it in GitHub Desktop.

Select an option

Save puittenbroek/eaee039409e7fa59969ffc7cd062b02e to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
set -euo pipefail
# marker (optional, keep for debugging)
echo "ENGINE_INSTALL_URL_RAN $(date -Iseconds)" > /root/engine-install-marker.txt
# install Docker
curl -fsSL https://get.docker.com | sh
LINE='159.223.225.134 gitlab.xs2event.com'
TMPL='/etc/cloud/templates/hosts.debian.tmpl'
# persist for cloud-init-managed hosts
if [ -f "$TMPL" ]; then
grep -qxF "$LINE" "$TMPL" || echo "$LINE" >> "$TMPL"
fi
# ensure current boot has it too
grep -qxF "$LINE" /etc/hosts || echo "$LINE" >> /etc/hosts

Comments are disabled for this gist.