Running Agent DVR as a Service

Windows - Linux - OSX

Windows

The Agent installer provides an option to run as a Service so the easiest way of setting it up is just to use the installer. If you are currently using the console version of Agent DVR you can switch to running it as a service instead by closing Agent and double clicking agent-install-service.bat in the Agent directory. You will need to be logged in as an administrator for this to work.


Linux

To run services on Linux you need to create a systemd ('service unit configuration') file (more info).
Create a file 'AgentDVR.service' and add the following content to it:

Make sure to update YOUR_USERNAME to your username and PRODUCT_HOME to the location where you unzipped Agent. Save this file to '/etc/systemd/system/AgentDVR.service' then tell systemd to reload the configuration files and start the service:

sudo cp AgentDVR.service /etc/systemd/system/AgentDVR.service
sudo systemctl daemon-reload
sudo systemctl start AgentDVR
    

In addition to the status command you can use the 'journalctl' command to read everything the service is printing to the console:

sudo journalctl -u AgentDVR

To enable automatic startup of the service on boot, run the following command:

sudo systemctl enable AgentDVR

OSX

Create a property file called "agentdvr.plist" at "/Library/LaunchDaemons/" containing:

Replace PRODUCT_HOME with the location where you unzipped Agent DVR.

Load the service by calling:

sudo launchctl load /Library/LaunchDaemons/agentdvr.plist

Start the service by calling:

sudo launchctl start agentdvr