Version 2 (modified by Cas, 7 years ago) (diff) |
---|
launchd Service Scripts
User Management
The following launchd script uses a separate user deluge, this is optional but recommended for security. To create a new deluge user follow the Apple KB steps.
Deluge Daemon (deluged) Service
Note: The path to deluge assumes installation using Macports and will need modified if using Deluge.app.
Create the file /Library/LaunchDaemons/com.deluged.plist containing the following:
<?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>com.deluged</string> <key>ProgramArguments</key> <array> <string>/opt/local/bin/deluged</string> <string>-d</string> </array> <key>UserName</key> <string>deluge</string> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> </dict> </plist>
Set the service to load on startup and then start it:
sudo launchctl load -w /Library/LaunchDaemons/com.deluged.plist sudo launchctl start com.deluged
Logging
To enable logging modify the ProgramArguments array and add the command options from Deluge Logging e.g.:
<string>/opt/local/bin/deluged</string> <string>-d</string> <string>-L</string> <string>error</string> <string>-l</string> <string>/Users/deluged/Library/Logs/deluged.log</string>