From 7ccf3c591bfbef0cec4437315709c3b48579f5ab Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sat, 18 Apr 2026 02:24:47 -0400 Subject: [PATCH] Fixes for dialog ui that accidently placed the ui itself into expected output. Tweaked the x-clacks header a bit to be better explained for those who may not know what it is. --- .includes/nginx.sh | 4 ++-- .includes/ui.sh | 18 ++++++++++++------ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.includes/nginx.sh b/.includes/nginx.sh index 4d3d12d..82568a1 100644 --- a/.includes/nginx.sh +++ b/.includes/nginx.sh @@ -6,7 +6,7 @@ nginxSitesAvailable="/etc/nginx/sites-available" nginxSitesEnabled="/etc/nginx/sites-enabled" nginxDefaultSite="${nginxSitesAvailable}/default.conf" nginxDefaultSiteLink="${nginxSitesEnabled}/default.conf" -clacksInfoUrl="https://www.gnuterrypratchett.com/" +clacksInfoUrl="https://xclacksoverhead.org/home/about" nginxManagedInclude="include /etc/nginx/sites-enabled/*.conf;" nginx_installed() { @@ -73,7 +73,7 @@ prompt_clacks_header() { return 1 fi - msgbox "X-Clacks-Overhead is a tribute header inspired by Terry Pratchett's Clacks. For more information, visit ${clacksInfoUrl}" + msgbox "X-Clacks-Overhead is an optional tribute header inspired by Terry Pratchett's Clacks. Websites use it to remember names with values such as GNU Terry Pratchett. For more information, please see: ${clacksInfoUrl}" rawNames="$(inputbox "Enter a comma-separated list of names for the X-Clacks-Overhead header, or leave blank to skip.")" || return 1 if [[ -z "${rawNames//[[:space:]]/}" ]]; then return 1 diff --git a/.includes/ui.sh b/.includes/ui.sh index 296db32..2b04fd9 100644 --- a/.includes/ui.sh +++ b/.includes/ui.sh @@ -8,7 +8,8 @@ inputbox() { dialog --backtitle "Configure Server" \ --clear \ - --inputbox "$promptText" 0 0 "$initialValue" --stdout + --inputbox "$promptText" 0 0 "$initialValue" \ + 3>&1 1>/dev/tty 2>&3 } passwordbox() { @@ -17,19 +18,22 @@ passwordbox() { dialog --backtitle "Configure Server" \ --clear \ - --passwordbox "$promptText" 0 0 "$initialValue" --stdout + --passwordbox "$promptText" 0 0 "$initialValue" \ + 3>&1 1>/dev/tty 2>&3 } msgbox() { dialog --backtitle "Configure Server" \ --clear \ - --msgbox "$*" 10 72 + --msgbox "$*" 10 72 \ + > /dev/tty 2>&1 } yesno() { if dialog --backtitle "Configure Server" \ --clear \ - --yesno "$*" 10 80 --stdout; then + --yesno "$*" 10 80 \ + > /dev/tty 2>&1; then echo "Yes" else echo "No" @@ -53,7 +57,8 @@ menulist() { dialog --backtitle "Configure Server" \ --clear \ --no-tags \ - --menu "$promptText" 0 0 0 "${menuList[@]}" --stdout + --menu "$promptText" 0 0 0 "${menuList[@]}" \ + 3>&1 1>/dev/tty 2>&3 } textbox() { @@ -61,5 +66,6 @@ textbox() { dialog --backtitle "Configure Server" \ --clear \ - --textbox "$filePath" 0 0 + --textbox "$filePath" 0 0 \ + > /dev/tty 2>&1 }