-
Notifications
You must be signed in to change notification settings - Fork 7
Install DevCDR Agent on Linux
Roger Zander edited this page Oct 19, 2019
·
4 revisions
- Install ASP.NET Core 2.x: https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/runtime-current
- Verify if .NET Core is installed:
dotnet --info
Host (useful for support):
Version: 2.2.5
Commit: 0a3c9209c0
.NET Core SDKs installed:
No SDKs were found.
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.5 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.5 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
- Download DevCDR Agent Core 2:
wget https://github.com/rzander/DevCDR/releases/download/1.0.0.3/devcdr_core2.tar
- extract archive
tar -xvf devcdr_core2.tar
- run DevCDR Agent
dotnet DevCDR_Agent_Core21.dll
Edit appsettings.json to define the DevCDRURL:
{
"settings": {
"DevCDRURL": "https://devcdrcore.azurewebsites.net/chat",
"Groups": "Linux"
}
}
create a file /etc/systemd/system/devcdr.service
with the following content:
Note: WorkingDirectory and ExecStart may be different in your environment
[Unit]
Description=DeviceCommander
[Service]
WorkingDirectory=/opt/devcdrcore
ExecStart=/usr/share/dotnet/dotnet /opt/devcdrcore/DevCDR_Agent_Core21.dll &
Restart=always
# Restart service after 10 seconds if the dotnet service crashes:
RestartSec=10
SyslogIdentifier=dotnet-devcdr
User=root
[Install]
WantedBy=multi-user.target
Register and start the service:
sudo systemctl enable devcdr
sudo systemctl start devcdr
To stop the DevCDR Agent:
sudo systemctl stop devcdr