From d6e846c7a0f89840dc5c3ce66b3d0a9db8bf4d22 Mon Sep 17 00:00:00 2001 From: d4nn13 Date: Sun, 19 Apr 2026 19:11:47 +0200 Subject: [PATCH] create-lxc: prompt for web UI autostart, enable it by default --- README.md | 4 +++- proxmox/create-lxc.sh | 43 +++++++++++++++++++++++++++++++++++-------- 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index cd7d3e6..3a2b44d 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,9 @@ HOSTNAME=tunbox MEMORY=512 STORAGE=fast-nvme \ bash -c "$(curl -fsSL https://git.d4nn13.de/d4nn13/wirecon/raw/branch/main/proxmox/create-lxc.sh)" ``` -Available overrides: `HOSTNAME`, `CORES`, `MEMORY`, `DISK`, `BRIDGE`, `STORAGE`, `TEMPLATE_STORAGE`, `WIRECON_REPO`, `WIRECON_REF`, `ROOT_PASSWORD`. +Available overrides: `HOSTNAME`, `CORES`, `MEMORY`, `DISK`, `BRIDGE`, `STORAGE`, `TEMPLATE_STORAGE`, `WIRECON_REPO`, `WIRECON_REF`, `ROOT_PASSWORD`, `WIRECON_WEB_AUTOSTART` (yes/no). + +The script also asks (interactively, default **yes**) whether to enable the web UI on boot. Edit configs in-browser right after provisioning instead of `vi`'ing over `pct enter`. ### Root login diff --git a/proxmox/create-lxc.sh b/proxmox/create-lxc.sh index 5e41dad..01098c3 100755 --- a/proxmox/create-lxc.sh +++ b/proxmox/create-lxc.sh @@ -66,6 +66,22 @@ if [[ -z "${ROOT_PASSWORD:-}" ]]; then fi fi +# --- web UI autostart ------------------------------------------------------- +# WIRECON_WEB_AUTOSTART=yes|no overrides the prompt. Default: yes (the UI is +# how you'll edit wg0.conf / wirecon.conf without drop-to-shell). +if [[ -z "${WIRECON_WEB_AUTOSTART:-}" ]]; then + if [[ -r /dev/tty && -w /dev/tty ]]; then + printf 'start web UI automatically on boot? [Y/n] ' >/dev/tty + IFS= read -r _ans