= 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 [http://support.apple.com/kb/PH6651 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: {{{ Label com.deluged ProgramArguments /opt/local/bin/deluged -d UserName deluge RunAtLoad KeepAlive }}} 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 [http://dev.deluge-torrent.org/wiki/Troubleshooting#EnableDelugeLogging Deluge Logging] e.g.: {{{ /opt/local/bin/deluged -d -L error -l /Users/deluged/Library/Logs/deluged.log }}}