mirror of
https://github.com/juewuy/ShellCrash.git
synced 2026-03-15 09:51:28 +00:00
refactor(set_ddns): replace recursion with while loop
This commit is contained in:
@@ -33,6 +33,7 @@ EOF
|
||||
}
|
||||
|
||||
set_ddns() {
|
||||
while true; do
|
||||
echo "-----------------------------------------------"
|
||||
read -r -p "请输入你的域名 > " str
|
||||
[ -z "$str" ] && domain="$domain" || domain="$str"
|
||||
@@ -58,9 +59,9 @@ set_ddns() {
|
||||
read -r -p "确认添加?(1/0) > " res
|
||||
if [ "$res" = 1 ]; then
|
||||
add_ddns
|
||||
else
|
||||
set_ddns
|
||||
break
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
set_ddns_service() {
|
||||
|
||||
Reference in New Issue
Block a user