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"