mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-22 09:29:50 +00:00
install.sh: added checks to detect if dotnet runtime is installed and same check again to confirm installation.
This commit is contained in:
@@ -13,6 +13,12 @@ echo ""
|
||||
echo "==============================="
|
||||
echo "Technitium DNS Server Installer"
|
||||
echo "==============================="
|
||||
|
||||
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 5.0.";
|
||||
then
|
||||
echo ""
|
||||
echo ".NET 5 Runtime is already installed."
|
||||
else
|
||||
echo ""
|
||||
echo "Installing .NET 5 Runtime..."
|
||||
|
||||
@@ -23,6 +29,15 @@ then
|
||||
ln -s $dotnetDir/dotnet /usr/bin >> $installLog 2>&1
|
||||
fi
|
||||
|
||||
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 5.0.";
|
||||
then
|
||||
echo ".NET 5 Runtime was installed succesfully!"
|
||||
else
|
||||
echo "Failed to install .NET 5 Runtime. Please try again."
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "Downloading Technitium DNS Server..."
|
||||
|
||||
@@ -69,6 +84,7 @@ then
|
||||
else
|
||||
echo ""
|
||||
echo "Failed to install Technitium DNS Server: systemd was not detected."
|
||||
exit 1
|
||||
fi
|
||||
else
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user