From e0cc5a06b70f9f464046cbeda2745de690d53f57 Mon Sep 17 00:00:00 2001 From: iRedTea Date: Fri, 16 Oct 2026 21:24:27 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20server-install.sh=20-=20an=20answer=20?= =?UTF-8?q?=C2=ABn=C2=BB=20about=20nginx=20no=20longer=20counts=20as=20ngi?= =?UTF-8?q?nx=20set=20up,=20so=20without=20nginx=20the=20server=20listens?= =?UTF-8?q?=20on=20every=20address?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server-install.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/server-install.sh b/server-install.sh index edd33c6..4b4d728 100755 --- a/server-install.sh +++ b/server-install.sh @@ -50,11 +50,11 @@ fi TTY= if (: /dev/null; then TTY=/dev/tty; fi -# ask VAR "question" default: the answer from the terminal, else the -# environment's LPRA_, else the default. +# ask VAR "question" default [KEY]: the answer from the terminal, else the +# environment's LPRA_ (KEY is VAR if not given), else the default. ask() { - var=$1 q=$2 def=$3 - eval "env=\${LPRA_$var:-}" + var=$1 q=$2 def=$3 key=${4:-$1} + eval "env=\${LPRA_$key:-}" [ -n "$env" ] && def=$env ans= if [ -n "$TTY" ]; then @@ -64,11 +64,11 @@ ask() { [ -n "$ans" ] || ans=$def eval "$var=\$ans" } -# confirm VAR "question" y|n: true for a yes. +# confirm KEY "question" y|n: true for a yes (LPRA_ without a terminal). +# The answer stays apart from the script's own variables of that name. confirm() { - ask "$1" "$2 (y/n)" "$3" - eval "v=\$$1" - case "$v" in [yYдД]*) return 0 ;; *) return 1 ;; esac + ask _yn "$2 (y/n)" "$3" "$1" + case "$_yn" in [yYдД]*) return 0 ;; *) return 1 ;; esac } # ---------- download ----------