mirror of
https://github.com/fergalmoran/DnsServer.git
synced 2025-12-22 09:29:50 +00:00
install.sh: updated script to install .NET 7 runtime.
This commit is contained in:
@@ -14,7 +14,7 @@ echo "==============================="
|
|||||||
echo "Technitium DNS Server Installer"
|
echo "Technitium DNS Server Installer"
|
||||||
echo "==============================="
|
echo "==============================="
|
||||||
|
|
||||||
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 6.0.";
|
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 7.0.";
|
||||||
then
|
then
|
||||||
dotnetFound="yes"
|
dotnetFound="yes"
|
||||||
else
|
else
|
||||||
@@ -24,36 +24,36 @@ fi
|
|||||||
if [ ! -d $dotnetDir ] && [ "$dotnetFound" = "yes" ]
|
if [ ! -d $dotnetDir ] && [ "$dotnetFound" = "yes" ]
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
echo ".NET 6 Runtime is already installed."
|
echo ".NET 7 Runtime is already installed."
|
||||||
else
|
else
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
if [ -d $dotnetDir ] && [ "$dotnetFound" = "yes" ]
|
if [ -d $dotnetDir ] && [ "$dotnetFound" = "yes" ]
|
||||||
then
|
then
|
||||||
dotnetUpdate="yes"
|
dotnetUpdate="yes"
|
||||||
echo "Updating .NET 6 Runtime..."
|
echo "Updating .NET 7 Runtime..."
|
||||||
else
|
else
|
||||||
dotnetUpdate="no"
|
dotnetUpdate="no"
|
||||||
echo "Installing .NET 6 Runtime..."
|
echo "Installing .NET 7 Runtime..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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
|
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 7.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 6.0.";
|
if dotnet --list-runtimes 2> /dev/null | grep -q "Microsoft.NETCore.App 7.0.";
|
||||||
then
|
then
|
||||||
if [ "$dotnetUpdate" = "yes" ]
|
if [ "$dotnetUpdate" = "yes" ]
|
||||||
then
|
then
|
||||||
echo ".NET 6 Runtime was updated successfully!"
|
echo ".NET 7 Runtime was updated successfully!"
|
||||||
else
|
else
|
||||||
echo ".NET 6 Runtime was installed successfully!"
|
echo ".NET 7 Runtime was installed successfully!"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo "Failed to install .NET 6 Runtime. Please try again."
|
echo "Failed to install .NET 7 Runtime. Please try again."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user