From 70914c20a228841f1cea2e8e187131775346add7 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 20 Mar 2026 13:58:57 +0100 Subject: [PATCH] Add optional VersityGW WebGUI support Prompt the user during install to enable the beta VersityGW WebGUI and, if accepted, append VGW_WEBUI_PORT=:7071 and VGW_WEBUI_NO_TLS=true to /etc/versitygw.d/gateway.conf. Update the installer to report that the WebGUI will be enabled and modify the completion script to display the WebGUI URL (http://:7071) when the config contains VGW_WEBUI_PORT. Keeps existing access/key generation and default gateway port unchanged. --- ct/versitygw.sh | 3 +++ install/versitygw-install.sh | 12 ++++++++++++ 2 files changed, 15 insertions(+) diff --git a/ct/versitygw.sh b/ct/versitygw.sh index 6d46337cc..d9df03f45 100644 --- a/ct/versitygw.sh +++ b/ct/versitygw.sh @@ -52,3 +52,6 @@ msg_ok "Completed Successfully!\n" echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" echo -e "${INFO}${YW} Access it using the following URL:${CL}" echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7070${CL}" +if grep -qs 'VGW_WEBUI_PORT' /etc/versitygw.d/gateway.conf 2>/dev/null; then + echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:7071${CL} (WebGUI)" +fi diff --git a/install/versitygw-install.sh b/install/versitygw-install.sh index f25467cd3..f1580406c 100644 --- a/install/versitygw-install.sh +++ b/install/versitygw-install.sh @@ -19,6 +19,14 @@ msg_info "Configuring VersityGW" mkdir -p /opt/versitygw-data ACCESS_KEY=$(openssl rand -base64 18 | tr -dc 'a-zA-Z0-9' | cut -c1-20) SECRET_KEY=$(openssl rand -base64 36 | tr -dc 'a-zA-Z0-9' | cut -c1-40) + +WEBUI_CONF="" +read -rp "Would you like to enable the VersityGW WebGUI (Beta)? (y/N): " webui_prompt +if [[ "${webui_prompt,,}" =~ ^(y|yes)$ ]]; then + WEBUI_CONF="\nVGW_WEBUI_PORT=:7071\nVGW_WEBUI_NO_TLS=true" + msg_ok "WebGUI will be enabled on port 7071" +fi + cat </etc/versitygw.d/gateway.conf VGW_BACKEND=posix VGW_BACKEND_ARG=/opt/versitygw-data @@ -26,6 +34,10 @@ VGW_PORT=7070 ROOT_ACCESS_KEY_ID=${ACCESS_KEY} ROOT_SECRET_ACCESS_KEY=${SECRET_KEY} EOF + +if [[ -n "$WEBUI_CONF" ]]; then + echo -e "$WEBUI_CONF" >>/etc/versitygw.d/gateway.conf +fi msg_ok "Configured VersityGW" msg_info "Enabling Service"