Skip to content

Commit

Permalink
Update install script.
Browse files Browse the repository at this point in the history
  • Loading branch information
bitbound committed Apr 25, 2020
1 parent 0f495fd commit 94e34aa
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions Server/wwwroot/Downloads/Install-Linux-x64.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,33 +52,34 @@ unzip ./Remotely-Linux.zip
chmod +x ./Remotely_Agent
chmod +x ./ScreenCast/Remotely_ScreenCast.Linux

cat > ./ConnectionInfo.json << EOL
{
"DeviceID":"$GUID",
"Host":"$HostName",
"OrganizationID": "$Organization",
"ServerVerificationToken":""
}
EOL

connectionInfo="{
\"DeviceID\":\"$GUID\",
\"Host\":\"$HostName\",
\"OrganizationID\": \"$Organization\",
\"ServerVerificationToken\":\"\"
}"

echo "$connectionInfo" > ./ConnectionInfo.json

curl --head $HostName/Downloads/Remotely-Linux.zip | grep etag | cut -d' ' -f 2 > etag.txt

echo Creating service...

cat > /etc/systemd/system/remotely-agent.service << EOL
[Unit]
serviceConfig="[Unit]
Description=The Remotely agent used for remote access.
[Service]
WorkingDirectory=/usr/local/bin/Remotely/
ExecStart=/usr/local/bin/Remotely/Remotely_Agent
Restart=always
StartLimitIntervalSec=0
RestartSec=10"
RestartSec=10
[Install]
WantedBy=graphical.target
EOL
WantedBy=graphical.target"

echo "$serviceConfig" > /etc/systemd/system/remotely-agent.service

systemctl enable remotely-agent
systemctl restart remotely-agent
Expand Down

0 comments on commit 94e34aa

Please sign in to comment.