mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-24 02:19:54 +07:00
arc-functions: fix
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
646d7cef38
commit
38558d4452
@ -693,26 +693,27 @@ function arcDNSMenu() {
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
if [ "${CONFDONE}" == "true" ]; then
|
||||
while true; do
|
||||
ARCDNS="$(readConfigKey "arc.dns" "${USER_CONFIG_FILE}")"
|
||||
MSG="Register your Subdomain at arcdns.tech\n"
|
||||
MSG+="Enter the Values from ArcDNS below:\n"
|
||||
dialog --backtitle "$(backtitle)" --title "Add DSM User" \
|
||||
--form "${MSG}" 8 60 3 "Domain:" 1 1 "domain" 1 10 50 0 "Token:" 2 1 "token" 2 10 50 0 \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && return
|
||||
domain="$(cat "${TMP_PATH}/resp" | sed -n '1p')"
|
||||
token="$(cat "${TMP_PATH}/resp" | sed -n '2p')"
|
||||
if [ -z "${domain}" ] || [ -z "${token}" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "ArcDNS" \
|
||||
--msgbox "Invalid Domain or Token, retry!" 0 0
|
||||
continue
|
||||
else
|
||||
ARCDNS="https://arcdns.tech/update/${domain}/${token}"
|
||||
dialog --backtitle "$(backtitle)" --colors --title "ArcDNS" \
|
||||
--msgbox "ArcDNS set successful!" 0 0
|
||||
fi
|
||||
ARCDNS="$(readConfigKey "arc.dns" "${USER_CONFIG_FILE}")"
|
||||
MSG="Register your Subdomain at arcdns.tech\n"
|
||||
MSG+="Enter the Values from ArcDNS below:\n"
|
||||
dialog --backtitle "$(backtitle)" --title "Add DSM User" \
|
||||
--form "${MSG}" 8 60 3 "Domain:" 1 1 "domain" 1 10 50 0 "Token:" 2 1 "token" 2 10 50 0 \
|
||||
2>"${TMP_PATH}/resp"
|
||||
[ $? -ne 0 ] && break
|
||||
domain="$(cat "${TMP_PATH}/resp" | sed -n '1p')"
|
||||
token="$(cat "${TMP_PATH}/resp" | sed -n '2p')"
|
||||
if [ -z "${domain}" ] || [ -z "${token}" ]; then
|
||||
dialog --backtitle "$(backtitle)" --title "ArcDNS" \
|
||||
--infobox "Invalid Domain or Token, retry!" 0 0
|
||||
sleep 3
|
||||
continue
|
||||
else
|
||||
ARCDNS="https://arcdns.tech/update/${domain}/${token}"
|
||||
dialog --backtitle "$(backtitle)" --colors --title "ArcDNS" \
|
||||
--msgbox "ArcDNS set successful!" 0 0
|
||||
writeConfigKey "arc.dns" "${ARCDNS}" "${USER_CONFIG_FILE}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
|
||||
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
|
||||
|
Loading…
Reference in New Issue
Block a user