Update technitiumdns-update.sh

This commit is contained in:
tteckster 2022-03-28 17:00:13 -04:00 committed by GitHub
parent b507e33629
commit b5f4961d1d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@ echo "==============================="
echo "Technitium DNS Server Update" echo "Technitium DNS Server Update"
echo "===============================" echo "==============================="
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 5.0."; if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0.";
then then
dotnetFound="yes" dotnetFound="yes"
else else
@ -24,24 +24,24 @@ fi
if [ -d $dotnetDir ] if [ -d $dotnetDir ]
then then
dotnetUpdate="yes" dotnetUpdate="yes"
echo "Updating .NET 5 Runtime..." echo "Updating .NET 6 Runtime..."
fi fi
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 5.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >> $installLog 2>&1 curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 --runtime dotnet --no-path --install-dir $dotnetDir --verbose >> $installLog 2>&1
if [ ! -f "/usr/bin/dotnet" ] if [ ! -f "/usr/bin/dotnet" ]
then then
ln -s $dotnetDir/dotnet /usr/bin >> $installLog 2>&1 ln -s $dotnetDir/dotnet /usr/bin >> $installLog 2>&1
fi fi
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 5.0."; if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0.";
then then
if [ "$dotnetUpdate" = "yes" ] if [ "$dotnetUpdate" = "yes" ]
then then
echo ".NET 5 Runtime was updated successfully!" echo ".NET 6 Runtime was updated successfully!"
fi fi
else else
echo "Failed to update .NET 5 Runtime. Please try again." echo "Failed to update .NET 6 Runtime. Please try again."
exit 1 exit 1
fi fi