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.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user