|
| 1 | +#!/usr/bin/env bash |
| 2 | +# Engine comes from community-scripts/core; this repo only ships the scripts. |
| 3 | +# A local core checkout wins (COMMUNITY_SCRIPTS_CORE_DIR, else a sibling ../core), |
| 4 | +# so a fork or branch of core can be tested without editing this file. |
| 5 | +_cs_boot="${COMMUNITY_SCRIPTS_CORE_DIR:-$(dirname "${BASH_SOURCE[0]}")/../../core}/core/build.func" |
| 6 | +source "$_cs_boot" 2>/dev/null || source <(curl -fsSL "${COMMUNITY_SCRIPTS_CORE_URL:-https://raw.githubusercontent.com/community-scripts/core/main}/core/build.func") |
| 7 | +# Copyright (c) 2021-2026 community-scripts ORG |
| 8 | +# Author: Nick Berardi (nberardi) |
| 9 | +# License: MIT | https://github.com/community-scripts/ProxmoxVED/raw/main/LICENSE |
| 10 | +# Source: https://nextdns.io | https://github.com/nextdns/nextdns |
| 11 | + |
| 12 | +APP="NextDNS" |
| 13 | +var_tags="${var_tags:-dns;adblock;network}" |
| 14 | +var_cpu="${var_cpu:-1}" |
| 15 | +var_ram="${var_ram:-512}" |
| 16 | +var_disk="${var_disk:-2}" |
| 17 | +var_os="${var_os:-debian}" |
| 18 | +var_version="${var_version:-13}" |
| 19 | +#var_arm64="${var_arm64:-no}" # unset = ask the user; set yes/no only when verified |
| 20 | +var_unprivileged="${var_unprivileged:-1}" |
| 21 | +export var_nextdns_profile="${var_nextdns_profile:-}" |
| 22 | + |
| 23 | +header_info "$APP" |
| 24 | +variables |
| 25 | +color |
| 26 | +catch_errors |
| 27 | + |
| 28 | +function update_script() { |
| 29 | + header_info |
| 30 | + check_container_storage |
| 31 | + check_container_resources |
| 32 | + |
| 33 | + if [[ ! -x /usr/bin/nextdns ]]; then |
| 34 | + msg_error "No ${APP} Installation Found!" |
| 35 | + exit |
| 36 | + fi |
| 37 | + |
| 38 | + msg_info "Updating ${APP}" |
| 39 | + $STD apt update |
| 40 | + $STD apt install -y nextdns |
| 41 | + msg_ok "Updated ${APP}" |
| 42 | + msg_ok "Updated successfully!" |
| 43 | + exit |
| 44 | +} |
| 45 | + |
| 46 | +start |
| 47 | +build_container |
| 48 | +description |
| 49 | + |
| 50 | +msg_ok "Completed Successfully!\n" |
| 51 | +echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}" |
| 52 | +echo -e "${INFO}${YW}NextDNS is configured and serving DNS on:${CL}" |
| 53 | +echo -e "${GATEWAY}${BGN}${IP}:53${CL} ${YW}(TCP/UDP)${CL}" |
| 54 | +echo -e "${INFO}${YW}Profiles are managed at: https://my.nextdns.io${CL}" |
| 55 | +echo -e "${INFO}${YW}Point DHCP clients or your router upstream DNS at the container IP.${CL}" |
0 commit comments