From 9007df570620b19f5d50159be950474b077cfedf Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sun, 19 Jan 2020 15:28:14 -0800 Subject: [PATCH] Add dotnet runtime install to Linux agent install. --- Agent/Services/DeviceSocket.cs | 2 +- Server/wwwroot/Downloads/Install-Linux-x64.sh | 10 ++++++++++ Utilities/Remotely_Server_Install.sh | 3 --- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/Agent/Services/DeviceSocket.cs b/Agent/Services/DeviceSocket.cs index e5c7133e..cf08b793 100644 --- a/Agent/Services/DeviceSocket.cs +++ b/Agent/Services/DeviceSocket.cs @@ -276,7 +276,7 @@ namespace Remotely.Agent.Services var whoLine = whoString.Split('\n', StringSplitOptions.RemoveEmptyEntries).First(); var whoSplit = whoLine.Split(' ', StringSplitOptions.RemoveEmptyEntries); username = whoSplit[0]; - display = whoSplit[1]; + display = whoSplit.Last().Trim('(').Trim(')'); args = $"-u {username} {args}"; } var psi = new ProcessStartInfo() diff --git a/Server/wwwroot/Downloads/Install-Linux-x64.sh b/Server/wwwroot/Downloads/Install-Linux-x64.sh index 3e979390..3802b706 100644 --- a/Server/wwwroot/Downloads/Install-Linux-x64.sh +++ b/Server/wwwroot/Downloads/Install-Linux-x64.sh @@ -12,6 +12,16 @@ if [ "$1" = "--uninstall" ]; then exit fi +UbuntuVersion=$(lsb_release -r -s) + +wget -q https://packages.microsoft.com/config/ubuntu/$UbuntuVersion/packages-microsoft-prod.deb -O packages-microsoft-prod.deb +dpkg -i packages-microsoft-prod.deb +apt-get update +apt-get install apt-transport-https +apt-get update +apt-get install dotnet-runtime-3.1 +rm packages-microsoft-prod.deb + apt-get -y install unzip apt-get -y install libc6-dev apt-get -y install libgdiplus diff --git a/Utilities/Remotely_Server_Install.sh b/Utilities/Remotely_Server_Install.sh index 1cbb9550..e778e7da 100644 --- a/Utilities/Remotely_Server_Install.sh +++ b/Utilities/Remotely_Server_Install.sh @@ -1,7 +1,4 @@ #!/bin/bash -echo "WARNING: This script won't work until the ASP.NET Core runtime version is updated in the package manager to version 3.1.1." -read -p "Press Enter to exit." -exit echo "Thanks for trying remotely! If you have any questions, feel free to email me at Translucency_Software@outlook.com." echo read -p "Enter path where the Remotely server files are located (typically /var/www/remotely): " appRoot