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.

Instructions here are for manual installs. The install scripts on the download page include service setup.

Linux

To run services on Linux you need to create a systemd ('service unit configuration') file (more info).
Create or edit the 'AgentDVR.service' file in the Agent directory (where you unzipped Agent) and replace the DOT_NET_LOCATION, AGENT_LOCATION and YOUR_USERNAME fields in it (as below):

IMPORTANT: Make sure to update YOUR_USERNAME to your username, AGENT_LOCATION to the location where you unzipped Agent and DOT_NET_LOCATION to where the dotnet executable is. For example sean, /home/sean/Desktop/Agent and /usr/bin/dotnet

Copy the file to the system directory and start it:

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

To check the status of the service:

sudo systemctl status AgentDVR.service

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

If you edit the service file you will need to reload the services list:

        sudo systemctl stop AgentDVR
        sudo systemctl daemon-reload
        sudo systemctl start AgentDVR
          

OSX

Step 1: Create a property file called "com.ispy.agent.dvr.plist" at "/Library/LaunchDaemons/" containing the following (change your_username to your actual username):

IMPORTANT: Replace /Applications/Agent/ with the folder where you unzipped Agent DVR.

Step 2: Change ownership of com.ispy.agent.dvr.plist with the following command in terminal:

sudo chown root:wheel /Library/LaunchDaemons/com.ispy.agent.dvr.plist

Step 3: Make sure /Applications/Agent/ folder, including subfolders and files have the following privileges:

  • system (owner) read and write
  • admin read and write
  • everyone read only

Step 4: Restart your computer, and Agent should now run as service.

Notes:

To load the service manually, use the following command in terminal:

sudo launchctl load -w /Library/LaunchDaemons/com.ispy.agent.dvr.plist

To unload the service manually, use the following command in terminal:

sudo launchctl unload -w /Library/LaunchDaemons/com.ispy.agent.dvr.plist