Explorar o código

Update technitiumdns-v5.sh

check for ASP.NET Core Runtime, if not present, install
tteckster %!s(int64=2) %!d(string=hai) anos
pai
achega
9aea5320f3
Modificáronse 1 ficheiros con 8 adicións e 0 borrados
  1. 8 0
      ct/technitiumdns-v5.sh

+ 8 - 0
ct/technitiumdns-v5.sh

@@ -335,6 +335,14 @@ echo "==============================="
 echo "Technitium DNS Server Update"
 echo "==============================="
 
+if ! dpkg -s aspnetcore-runtime-7.0 > /dev/null 2>&1; then
+    wget -q https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
+    dpkg -i packages-microsoft-prod.deb
+    apt-get update
+    apt-get install -y aspnetcore-runtime-7.0
+    rm packages-microsoft-prod.deb
+fi
+
 if dotnet --list-runtimes 2>/dev/null | grep -q "Microsoft.NETCore.App 7.0."; then
 	dotnetFound="yes"
 else