mirror of
https://github.com/AuxXxilium/arc.git
synced 2024-11-23 23:59:53 +07:00
tree: rework
Signed-off-by: AuxXxilium <info@auxxxilium.tech>
This commit is contained in:
parent
daec6b60fd
commit
d58d1f5b0c
@ -693,25 +693,28 @@ function arcDNSMenu() {
|
||||
CONFDONE="$(readConfigKey "arc.confdone" "${USER_CONFIG_FILE}")"
|
||||
if [ "${CONFDONE}" == "true" ]; then
|
||||
while true; do
|
||||
ARCDNS="$(readConfigKey "arc.dns" "${USER_CONFIG_FILE}")"
|
||||
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" 1 10 50 0 "Token:" 2 1 "token" 2 10 50 0 \
|
||||
--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}" ]; then
|
||||
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="https://arcdns.tech/update/${domain}/${token}"
|
||||
ARCDNS="${domain}/${token}"
|
||||
dialog --backtitle "$(backtitle)" --colors --title "ArcDNS" \
|
||||
--msgbox "ArcDNS set successful!" 0 0
|
||||
writeConfigKey "arc.dns" "${ARCDNS}" "${USER_CONFIG_FILE}"
|
||||
writeConfigKey "addons.arcdns" "${ARCDNS}" "${USER_CONFIG_FILE}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
@ -87,7 +87,7 @@ else
|
||||
writeConfigKey "automated" "false" "${USER_CONFIG_FILE}"
|
||||
fi
|
||||
if [ -f "${PART1_PATH}/ARC-BRANCH" ]; then
|
||||
ARCBRANCH=$(cat "${PART1_PATH}/ARC-BRANCH") && writeConfigKey "arc.branch" "ARCBRANCH" "${USER_CONFIG_FILE}"
|
||||
ARCBRANCH=$(cat "${PART1_PATH}/ARC-BRANCH") && writeConfigKey "arc.branch" "${ARCBRANCH}" "${USER_CONFIG_FILE}"
|
||||
rm -f "${PART1_PATH}/ARC-BRANCH" >/dev/null 2>&1 || true
|
||||
fi
|
||||
[ -f "${PART3_PATH}/automated" ] && rm -f "${PART3_PATH}/automated" >/dev/null 2>&1 || true
|
||||
|
@ -41,7 +41,6 @@ PRODUCTVER="$(readConfigKey "productver" "${USER_CONFIG_FILE}")"
|
||||
BUILDNUM="$(readConfigKey "buildnum" "${USER_CONFIG_FILE}")"
|
||||
SMALLNUM="$(readConfigKey "smallnum" "${USER_CONFIG_FILE}")"
|
||||
ARCBRANCH="$(readConfigKey "arc.branch" "${USER_CONFIG_FILE}")"
|
||||
ARCDNS="$(readConfigKey "arc.dns" "${USER_CONFIG_FILE}")"
|
||||
# Read new PAT Info from Config
|
||||
PAT_URL="$(readConfigKey "paturl" "${USER_CONFIG_FILE}")"
|
||||
PAT_HASH="$(readConfigKey "pathash" "${USER_CONFIG_FILE}")"
|
||||
@ -180,8 +179,6 @@ for ADDON in "redpill" "revert" "misc" "eudev" "disks" "localrss" "notify" "upda
|
||||
[ -f "${USER_UP_PATH}/${MODEL}.dts" ] && cp -f "${USER_UP_PATH}/${MODEL}.dts" "${RAMDISK_PATH}/addons/model.dts"
|
||||
elif [ "${ADDON}" == "cpufreqscaling" ]; then
|
||||
PARAMS=${CPUGOVERNOR}
|
||||
elif [ "${ADDON}" == "arcdns" ]; then
|
||||
PARAMS=${ARCDNS}
|
||||
fi
|
||||
installAddon "${ADDON}" "${PLATFORM}" || exit 1
|
||||
echo "/addons/${ADDON}.sh \${1} ${PARAMS}" >>"${RAMDISK_PATH}/addons/addons.sh" 2>>"${LOG_FILE}" || exit 1
|
||||
|
Loading…
Reference in New Issue
Block a user