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://<IP>:7071) when the config contains VGW_WEBUI_PORT. Keeps existing access/key generation and default gateway port unchanged.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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 <<EOF >/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"
|
||||
|
||||
Reference in New Issue
Block a user