diff --git a/README.md b/README.md index fe5ae33..0951f62 100644 --- a/README.md +++ b/README.md @@ -37,10 +37,17 @@ Use a fine-grained read-only PAT scoped to just this repo (Contents: Read). **Cloud provider install-script / user-data field (IONOS, DigitalOcean, Hetzner, ...):** these run as root with no terminal attached while the image is still being provisioned, so `bootstrap.sh`'s interactive hand-off -doesn't apply yet. Paste `cloud-init.sh` into that field instead: -``` -https://raw.githubusercontent.com/outis1one/ubuntu-post-install/main/cloud-init.sh -``` +doesn't apply yet. Use `cloud-init.sh` instead — it's a plain cloud-init +user-data shell script (starts with `#!/bin/bash`, no `#cloud-config` YAML). + +IONOS's server-creation screen has a **User Data** box under "Scripts" with +a **Script Type** choice of *Cloud Config* or *Shell Script* — pick +**Shell Script**, then either click **Import from file** and select +`cloud-init.sh`, or paste its contents directly. User-data fields run the +script's own content; they don't fetch a URL, so paste/import the file +itself rather than a link to it. (DigitalOcean/Hetzner's plain "User data" +textbox works the same way — paste the script contents in directly.) + It clones the repo in the background during provisioning and installs a one-shot login hook. The provider boots Ubuntu 24.04, this runs unattended, and by the time you SSH in the whiptail service menu is already waiting for diff --git a/cloud-init.sh b/cloud-init.sh index 3aba119..605f8d6 100755 --- a/cloud-init.sh +++ b/cloud-init.sh @@ -37,6 +37,7 @@ REPO_URL="https://github.com/outis1one/ubuntu-post-install.git" DEST="/root/ubuntu-post-install" MARKER="/root/.ubuntu-post-install-pending" HOOK="/etc/profile.d/99-ubuntu-post-install.sh" +export DEBIAN_FRONTEND=noninteractive command -v git >/dev/null 2>&1 || { apt-get update -qq && apt-get install -y git; }