-
-
Notifications
You must be signed in to change notification settings - Fork 195
Running Trunk Recorder
If all goes well you should now have the executable named trunk-recorder
, and created the config.json
configuration file as described in the Wiki and README.
From your build directory (e.g. trunk-build
) you can now run
./trunk-recorder
Trunk Recorder will look for a config.json file in the same directory as it is being run in. You can point it to a different config file by using the --config argument on the command line, for example: ./trunk-recorder --config=examples/config-wmata-rtl.json
.
Switch to the LaunchDaemons folder.
cd /Library/LaunchDaemons
Create a new plist file to define the service.
sudo vi trunk-recorder.plist
Modify the sample .plist file below to meet your environment. You'll need to modify the Program, WorkingDirectory, EnvironmentVariables, UserName, and GroupName at a minimum. Make sure that your PATH includes the directory(s) where sox and fdkaac are installed. You can use the command which sox fdkaac
to find their locations.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>trunk-recorder</string>
<key>Program</key>
<string>/Users/radio/trunk-build/trunk-recorder</string>
<key>WorkingDirectory</key>
<string>/Users/radio/trunk-build/</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/opt/local/bin/</string>
</dict>
<key>UserName</key>
<string>radio</string>
<key>GroupName</key>
<string>staff</string>
<key>InitGroups</key>
<true/>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
<key>StandardErrorPath</key>
<string>/Users/radio/trunk-build/trunk-recorder-service.log</string>
</dict>
</plist>
Ensure the .plist file ownership is set to root:wheel. If you used another editor to create or modify the .plist, or if it is copied from another location on the system, the service may not start unless file ownership has been set correctly.
Use ls -al trunk-recorder.plist
to ensure the ownership looks similar to below:
-rw-r--r-- 1 root wheel 856 Aug 12 11:55 trunk-recorder.plist
If the file does not have the correct permissions, reset root ownership with the following command:
sudo chown root:wheel trunk-recorder.plist
Load the service using the following command:
sudo launchctl load trunk-recorder.plist
Verify that the service is running using one of the following two commands:
sudo launchctl list | grep trunk-recorder
ps -ef | grep trunk-recorder
To restart, or temporary stop and start the service, use the following commands:
sudo launchctl stop trunk-recorder.plist
sudo launchctl start trunk-recorder.plist
To permanently unload the service using the following command:
sudo launchctl unload trunk-recorder.plist
- What is Trunk-Recorder?
- Roadmap (TBD)
- Enhancements
- FAQ's
- Global FAQ's
- HackRF FAQ's
- RTLSDR FAQ's