From cd20305be641f5d88b742460a25feea2a7946e8f Mon Sep 17 00:00:00 2001 From: tremor021 Date: Sat, 31 May 2025 22:22:41 +0200 Subject: [PATCH] Update tinyauth --- install/alpine-tinyauth-install.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/install/alpine-tinyauth-install.sh b/install/alpine-tinyauth-install.sh index 1396dc1..e5b6c62 100644 --- a/install/alpine-tinyauth-install.sh +++ b/install/alpine-tinyauth-install.sh @@ -36,7 +36,15 @@ EOF echo "${RELEASE}" >/opt/tinyauth_version.txt msg_ok "Installed Tinyauth" -read -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url +for i in {1..3}; do + read -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url + [[ $app_url =~ ^https?://[a-zA-Z0-9.-]+\.[a-zA-Z]{2,} ]] && break + [ $i -eq 3 ] && { + echo "Max attempts reached" + exit 1 + } + echo "Invalid URL format ($((3 - i)) attempts left)" +done msg_info "Creating Tinyauth Service" SECRET=$(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9' | head -c 32)