arc: cleanup

Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
AuxXxilium
2024-09-07 12:53:37 +02:00
parent 5b917907ca
commit 091f0aa722
2 changed files with 1 additions and 42 deletions

View File

@@ -674,43 +674,6 @@ function sequentialIOMenu() {
return
}
###############################################################################
# Shows arcDNS menu to user
function arcDNSMenu() {
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
if [ "${CONFDONE}" == "true" ]; then
while true; do
ARCDNS="$(readConfigKey "addons.arcdns" "${USER_CONFIG_FILE}")"
domain="$(echo ${ARCDNS} | cut -d'/' -f1)"
token="$(echo ${ARCDNS} | cut -d'/' -f2)"
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:-domain}" 1 10 50 0 "Token:" 2 1 "${token:-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}" ] || [ "${domain}" = "domain" ] || [ "${token}" = "token" ]; then
dialog --backtitle "$(backtitle)" --title "ArcDNS" \
--infobox "Invalid Domain or Token, retry!" 0 0
deleteConfigKey "addons.arcdns" "${USER_CONFIG_FILE}"
sleep 3
continue
else
ARCDNS="${domain}/${token}"
dialog --backtitle "$(backtitle)" --colors --title "ArcDNS" \
--msgbox "ArcDNS set successful!" 0 0
writeConfigKey "addons.arcdns" "${ARCDNS}" "${USER_CONFIG_FILE}"
break
fi
done
writeConfigKey "arc.builddone" "false" "${USER_CONFIG_FILE}"
BUILDDONE="$(readConfigKey "arc.builddone" "${USER_CONFIG_FILE}")"
fi
return
}
###############################################################################
# Shows backup menu to user
function backupMenu() {

View File

@@ -517,7 +517,7 @@ function arcPatch() {
if [ -n "${ARCCONF}" ]; then
dialog --clear --backtitle "$(backtitle)" \
--nocancel --title "SN/Mac Options"\
--menu "Please choose an Option." 7 50 0 \
--menu "Please choose an Option." 7 60 0 \
1 "Use Arc Patch (QC, Push Notify and more)" \
2 "Use random SN/Mac" \
3 "Use my own SN/Mac" \
@@ -939,9 +939,6 @@ else
if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "sequentialio"; then
echo "Q \"SequentialIO Options \" " >>"${TMP_PATH}/menu"
fi
if readConfigMap "addons" "${USER_CONFIG_FILE}" | grep -q "arcdns"; then
echo "R \"ArcDNS Options \" " >>"${TMP_PATH}/menu"
fi
echo "D \"StaticIP \" " >>"${TMP_PATH}/menu"
fi
if [ "${BOOTOPTS}" == "true" ]; then
@@ -1046,7 +1043,6 @@ else
o) dtsMenu; NEXT="o" ;;
P) storagepanelMenu; NEXT="P" ;;
Q) sequentialIOMenu; NEXT="Q" ;;
R) arcDNSMenu; NEXT="R" ;;
r) resetArcPatch; NEXT="r" ;;
# Boot Section
6) [ "${BOOTOPTS}" == "true" ] && BOOTOPTS='false' || BOOTOPTS='true'