parent
618fa65bc2
commit
36523dfd33
@ -27,17 +27,20 @@ function update_script() {
|
||||
msg_error "No ${APP} Installation Found!"
|
||||
exit
|
||||
fi
|
||||
msg_info "Updating ${APP}"
|
||||
|
||||
if ! dpkg -s aspnetcore-runtime-8.0 >/dev/null 2>&1; then
|
||||
curl -fsSL "https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb" -o $(basename "https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb")
|
||||
$STD dpkg -i packages-microsoft-prod.deb
|
||||
$STD apt-get update
|
||||
$STD apt-get install -y aspnetcore-runtime-8.0
|
||||
rm packages-microsoft-prod.deb
|
||||
fi
|
||||
$STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh)
|
||||
RELEASE=$(curl -fsSL https://technitium.com/dns/ | grep -oP 'Version \K[\d.]+')
|
||||
if [[ ! -f ~/.technitium || "${VERSION}" != "$(cat ~/.technitium)" ]]; then
|
||||
msg_info "Updating ${APP}"
|
||||
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/
|
||||
msg_ok "Updated Successfully"
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f /opt/DnsServerPortable.tar.gz
|
||||
msg_ok "Cleaned up"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at v${RELEASE}."
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
|
@ -31,10 +31,5 @@
|
||||
"username": null,
|
||||
"password": null
|
||||
},
|
||||
"notes": [
|
||||
{
|
||||
"text": "WARNING: Installation sources scripts outside of Community Scripts repo. Please check the source before installing.",
|
||||
"type": "warning"
|
||||
}
|
||||
]
|
||||
"notes": []
|
||||
}
|
||||
|
@ -21,14 +21,24 @@ $STD apt-get update
|
||||
$STD apt-get install -y aspnetcore-runtime-8.0
|
||||
msg_ok "Installed ASP.NET Core Runtime"
|
||||
|
||||
RELEASE=$(curl -fsSL https://technitium.com/dns/ | grep -oP 'Version \K[\d.]+')
|
||||
msg_info "Installing Technitium DNS"
|
||||
$STD bash <(curl -fsSL https://download.technitium.com/dns/install.sh)
|
||||
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
|
||||
msg_ok "Installed Technitium DNS"
|
||||
|
||||
msg_info "Creating service"
|
||||
cp /opt/technitium/dns/systemd.service /etc/systemd/system/technitium.service
|
||||
systemctl enable -q --now technitium
|
||||
msg_ok "Service created"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
rm -f /opt/DnsServerPortable.tar.gz
|
||||
$STD apt-get -y autoremove
|
||||
$STD apt-get -y autoclean
|
||||
msg_ok "Cleaned"
|
||||
|
Loading…
x
Reference in New Issue
Block a user