Improve PatchMon enrollment bootstrap fallback
This commit is contained in:
+4
-1
@@ -39,6 +39,9 @@ Recommended one-liner, prompts for token if env vars are not set:
|
||||
|
||||
Non-interactive one-liner:
|
||||
PATCHMON_AUTO_ENROLL_KEY='<key>' PATCHMON_AUTO_ENROLL_SECRET='<secret>' curl -fsSL https://gitea.wheelytho.com/Wheelz/Docker-Install/raw/branch/main/patchmon-enroll.sh | sudo -E bash -s -- --type direct-host -y
|
||||
|
||||
If a Proxmox host does not trust patchmon.wheelz.lab during bootstrap, pass the raw-IP server as a script argument, not as an env var before curl:
|
||||
curl -fsSL https://gitea.wheelytho.com/Wheelz/Docker-Install/raw/branch/main/patchmon-enroll.sh | bash -s -- --server http://192.168.20.232:3000 --token-key '<key>' --token-secret '<secret>' --type direct-host --force -y
|
||||
USAGE
|
||||
}
|
||||
|
||||
@@ -169,7 +172,7 @@ new_nested = ''' # Download, normalize, and execute installation script
|
||||
-H "X-API-KEY: $api_key" \\
|
||||
"$install_url" > "$nested_install_script"; then
|
||||
sed -i "s#http://192.168.20.232:3000#$PATCHMON_URL#g" "$nested_install_script"
|
||||
install_output=$(sh "$nested_install_script" 2>&1) || install_exit_code=$?
|
||||
install_output=$(bash "$nested_install_script" 2>&1) || install_exit_code=$?
|
||||
else
|
||||
install_exit_code=1
|
||||
install_output="Failed to download nested PatchMon agent installer from $install_url"
|
||||
|
||||
Reference in New Issue
Block a user