Running interactively is good for testing and trying it out. But, in production the agent should be run as a service to ensure the agent survives reboots.
OSX only for right now. Linux soon
Run in the agent directory
Run as a daemon (OSX | Linux)
$ ./agent/svc.sh install
Run as launch agent (only OSX)
$ ./agent/svc.sh install agent
potentially run UI tests Auto Logon and Lock
$ ./svc.sh status
8367 - vsoagent.myaccount.agent1
*note: output is (pid) (rc) (name) if it is running pid will have a positive number rc is last exit code. if negative, term signal number. if postive, err return code from last run. *
$ ./svc.sh stop
$ ./svc.sh start
If the service is loaded but you want to stop and start or the host has exited from some reason:
$ ./svc.sh restart
Stop first and then:
$ ./svc.sh uninstall
A .service file is created with the information about the service such as where the .plist file is etc...