technitiumdns.sh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. #!/usr/bin/env bash
  2. source <(curl -s https://raw.githubusercontent.com/tteck/Proxmox/main/misc/build.func)
  3. # Copyright (c) 2021-2023 tteck
  4. # Author: tteck (tteckster)
  5. # License: MIT
  6. # https://github.com/tteck/Proxmox/raw/main/LICENSE
  7. function header_info {
  8. clear
  9. cat <<"EOF"
  10. ______ __ _ __ _ ____ _ _______
  11. /_ __/__ _____/ /_ ____ (_) /_(_)_ ______ ___ / __ \/ | / / ___/
  12. / / / _ \/ ___/ __ \/ __ \/ / __/ / / / / __ __ \ / / / / |/ /\__ \
  13. / / / __/ /__/ / / / / / / / /_/ / /_/ / / / / / / / /_/ / /| /___/ /
  14. /_/ \___/\___/_/ /_/_/ /_/_/\__/_/\__,_/_/ /_/ /_/ /_____/_/ |_//____/
  15. EOF
  16. }
  17. header_info
  18. echo -e "Loading..."
  19. APP="Technitium DNS"
  20. var_disk="2"
  21. var_cpu="1"
  22. var_ram="512"
  23. var_os="debian"
  24. var_version="12"
  25. variables
  26. color
  27. catch_errors
  28. function default_settings() {
  29. CT_TYPE="1"
  30. PW=""
  31. CT_ID=$NEXTID
  32. HN=$NSAPP
  33. DISK_SIZE="$var_disk"
  34. CORE_COUNT="$var_cpu"
  35. RAM_SIZE="$var_ram"
  36. BRG="vmbr0"
  37. NET="dhcp"
  38. GATE=""
  39. DISABLEIP6="no"
  40. MTU=""
  41. SD=""
  42. NS=""
  43. MAC=""
  44. VLAN=""
  45. SSH="no"
  46. VERB="no"
  47. echo_default
  48. }
  49. function update_script() {
  50. header_info
  51. if [[ ! -d /etc/dns ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
  52. msg_info "Updating ${APP}"
  53. if ! dpkg -s aspnetcore-runtime-7.0 > /dev/null 2>&1; then
  54. wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb
  55. dpkg -i packages-microsoft-prod.deb &>/dev/null
  56. apt-get update &>/dev/null
  57. apt-get install -y aspnetcore-runtime-7.0 &>/dev/null
  58. rm packages-microsoft-prod.deb
  59. fi
  60. bash <(curl -fsSL https://download.technitium.com/dns/install.sh) &>/dev/null
  61. msg_ok "Updated Successfully"
  62. exit
  63. }
  64. start
  65. build_container
  66. description
  67. msg_ok "Completed Successfully!\n"
  68. echo -e "${APP} should be reachable by going to the following URL.
  69. ${BL}http://${IP}:5380${CL} \n"