Update tinyauth
This commit is contained in:
parent
cd20305be6
commit
713de5df2b
@ -36,14 +36,16 @@ EOF
|
|||||||
echo "${RELEASE}" >/opt/tinyauth_version.txt
|
echo "${RELEASE}" >/opt/tinyauth_version.txt
|
||||||
msg_ok "Installed Tinyauth"
|
msg_ok "Installed Tinyauth"
|
||||||
|
|
||||||
for i in {1..3}; do
|
i=1
|
||||||
|
while [ $i -le 3 ]; do
|
||||||
read -p "${TAB3}Enter your Tinyauth subdomain (e.g. https://tinyauth.example.com): " app_url
|
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
|
echo "$app_url" | grep -qE '^https?://[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' && break
|
||||||
[ $i -eq 3 ] && {
|
[ $i -eq 3 ] && {
|
||||||
echo "Max attempts reached"
|
echo "Max attempts reached"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
echo "Invalid URL format ($((3 - i)) attempts left)"
|
echo "Invalid URL format ($((3 - i)) attempts left)"
|
||||||
|
i=$((i + 1))
|
||||||
done
|
done
|
||||||
|
|
||||||
msg_info "Creating Tinyauth Service"
|
msg_info "Creating Tinyauth Service"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user