Files
ProxmoxVE/install/technitiumdns-install.sh
T

45 lines
1.3 KiB
Bash
Raw Normal View History

2023-03-22 20:48:20 -04:00
#!/usr/bin/env bash
# Copyright (c) 2021-2025 tteck
2023-03-22 20:48:20 -04:00
# Author: tteck (tteckster)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://technitium.com/dns/
2023-03-22 20:48:20 -04:00
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
2023-03-22 20:48:20 -04:00
color
verb_ip6
catch_errors
setting_up_container
network_check
update_os
msg_info "Installing ASP.NET Core Runtime"
curl -fsSL "https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb" -o "packages-microsoft-prod.deb"
2023-03-22 20:48:20 -04:00
$STD dpkg -i packages-microsoft-prod.deb
rm -rf packages-microsoft-prod.deb
$STD apt-get update
2024-02-05 07:26:30 -05:00
$STD apt-get install -y aspnetcore-runtime-8.0
2023-03-22 20:48:20 -04:00
msg_ok "Installed ASP.NET Core Runtime"
2025-08-19 14:05:37 +02:00
RELEASE=$(curl -fsSL https://technitium.com/dns/ | grep -oP 'Version \K[\d.]+')
2023-03-22 20:48:20 -04:00
msg_info "Installing Technitium DNS"
2025-08-19 14:05:37 +02:00
mkdir -p /opt/technitium/dns
curl -fsSL "https://download.technitium.com/dns/DnsServerPortable.tar.gz" -o /opt/DnsServerPortable.tar.gz
$STD tar zxvf /opt/DnsServerPortable.tar.gz -C /opt/technitium/dns/
echo "${RELEASE}" > ~/.technitium
2023-03-22 20:48:20 -04:00
msg_ok "Installed Technitium DNS"
2025-08-19 14:05:37 +02:00
msg_info "Creating service"
cp /opt/technitium/dns/systemd.service /etc/systemd/system/technitium.service
systemctl enable -q --now technitium
msg_ok "Service created"
2023-03-22 20:48:20 -04:00
motd_ssh
2023-05-15 07:39:30 -04:00
customize
2023-03-22 20:48:20 -04:00
msg_info "Cleaning up"
2025-08-19 14:05:37 +02:00
rm -f /opt/DnsServerPortable.tar.gz
2024-05-02 13:26:16 -04:00
$STD apt-get -y autoremove
$STD apt-get -y autoclean
2023-03-22 20:48:20 -04:00
msg_ok "Cleaned"