fix: set Proxmox container description correctly

This commit is contained in:
yellowcooln committed 2026-08-29 22:58:35 -04:00
1 parent f3570953c9
commit dc8a42a16a
2 files changed
+16 -10

No files matched your search

+6 -10
View File
@@ -214,8 +214,6 @@ msg_ok "Container created"
# ── USB passthrough ───────────────────────────────────────────────────────
msg_info "Configuring USB passthrough..."
cat >> "/etc/pve/lxc/${CTID}.conf" <<'EOF'
# USB passthrough for openHop Repeater
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/bus/usb dev/bus/usb none bind,optional,create=dir 0 0
EOF
@@ -360,9 +358,8 @@ if [[ "$INSTALL_CONSOLE" == "true" ]]; then
fi
# ── Container notes ───────────────────────────────────────────────────────
if command -v pct &>/dev/null; then
NOTES_TMP=$(mktemp)
cat > "$NOTES_TMP" <<'NOTES'
NOTES_TMP=$(mktemp)
cat > "$NOTES_TMP" <<'NOTES'
<div align="center">
<a href="https://openhop.dev/" target="_blank" rel="noopener noreferrer">
<img
@@ -454,11 +451,10 @@ if command -v pct &>/dev/null; then
</span>
</div>
NOTES
NOTES_TEXT=$(cat "$NOTES_TMP")
rm -f "$NOTES_TMP"
pct set "$CTID" --notes "$NOTES_TEXT"
msg_ok "Container notes set"
fi
NOTES_TEXT=$(cat "$NOTES_TMP")
rm -f "$NOTES_TMP"
pct set "$CTID" --description "$NOTES_TEXT"
msg_ok "Container notes set"
# ── Get container IP ──────────────────────────────────────────────────────
sleep 2
+10
View File
@@ -92,6 +92,16 @@ def test_console_is_opt_in_installed_after_repeater_and_not_enabled() -> None:
assert "web.web_path" not in script
def test_installer_sets_proxmox_html_description() -> None:
script = INSTALLER.read_text()
assert 'pct set "$CTID" --description "$NOTES_TEXT"' in script
assert 'pct set "$CTID" --notes' not in script
assert "# USB passthrough for openHop Repeater" not in script
assert "openHop Repeater LXC" in script
assert "https://docs.openhop.dev/projects/openhop-repeater/" in script
def test_installer_adds_update_command() -> None:
script = INSTALLER.read_text()