Correct cloud-init.sh usage instructions for real provider UIs

IONOS's User Data field takes a Script Type choice (Cloud Config vs Shell
Script) and runs the pasted/imported content directly rather than fetching
a URL. Update the README to say so, add DEBIAN_FRONTEND=noninteractive for
genuine unattended cloud-init execution.
This commit is contained in:
Claude
2026-08-10 02:33:26 +00:00
parent b2b4b6dd19
commit 5cab7fe9c0
2 changed files with 12 additions and 4 deletions
+11 -4
View File
@@ -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, **Cloud provider install-script / user-data field (IONOS, DigitalOcean,
Hetzner, ...):** these run as root with no terminal attached while the Hetzner, ...):** these run as root with no terminal attached while the
image is still being provisioned, so `bootstrap.sh`'s interactive hand-off image is still being provisioned, so `bootstrap.sh`'s interactive hand-off
doesn't apply yet. Paste `cloud-init.sh` into that field instead: 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).
https://raw.githubusercontent.com/outis1one/ubuntu-post-install/main/cloud-init.sh
``` 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 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, 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 and by the time you SSH in the whiptail service menu is already waiting for
+1
View File
@@ -37,6 +37,7 @@ REPO_URL="https://github.com/outis1one/ubuntu-post-install.git"
DEST="/root/ubuntu-post-install" DEST="/root/ubuntu-post-install"
MARKER="/root/.ubuntu-post-install-pending" MARKER="/root/.ubuntu-post-install-pending"
HOOK="/etc/profile.d/99-ubuntu-post-install.sh" 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; } command -v git >/dev/null 2>&1 || { apt-get update -qq && apt-get install -y git; }