<message>Delete the existing bootstrap.sh script used for cloud-init first boot, as it is no longer needed. Update the bootstrap.sh.example script to provide clearer instructions for users on how to customize and deploy their own bootstrap script, ensuring better guidance for cloud-init integration. These changes streamline the provisioning process and enhance user experience.
20 lines
862 B
Bash
20 lines
862 B
Bash
#!/bin/bash
|
|
# Example bootstrap script run by cloud-init at first boot.
|
|
# Copy to cloud-init/bootstrap.sh; sync-portal-files-to-lxc.sh deploys it to the portal root,
|
|
# served at http://YOUR_SERVER:5000/files/bootstrap.sh (not under first-boot/).
|
|
#
|
|
# Cloud-init downloads this and runs it as root. Add your first-boot logic here:
|
|
# - Install packages, apply config, run first-boot.sh from this repo, etc.
|
|
|
|
set -e
|
|
echo "[$(date -Iseconds)] Bootstrap script started."
|
|
|
|
# Example: run the full first-boot flow from your file server (same as user-data-remote-gnss.example)
|
|
# FILE_SERVER="http://10.20.50.1:5000/files/first-boot"
|
|
# curl -fsSL "$FILE_SERVER/first-boot.sh" -o /tmp/first-boot.sh
|
|
# curl -fsSL "$FILE_SERVER/first-boot.conf" -o /tmp/first-boot.conf
|
|
# chmod +x /tmp/first-boot.sh
|
|
# /tmp/first-boot.sh
|
|
|
|
echo "[$(date -Iseconds)] Bootstrap script finished."
|