Changes between Version 1 and Version 2 of UserGuide/Service/launchd
- Timestamp:
- 06/19/2016 10:22:20 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuide/Service/launchd
v1 v2 1 {{{#!comment 2 Credit for the steps goes to: https://gist.github.com/j10io/6877030 3 }}} 1 = launchd Service Scripts = 4 2 5 Optionally create a new `deluge` user for running the service: http://support.apple.com/kb/PH6651 3 == User Management == 6 4 7 To create a `LaunchDaemon` for Deluge, create `/Library/LaunchDaemons/com.deluged.plist` using the script below. This script uses user 'deluge', created in the first step so replace if other user required. 5 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. 6 7 == Deluge Daemon (deluged) Service == 8 8 9 9 ''Note: The path to deluge assumes installation using Macports and will need modified if using `Deluge.app`.'' 10 10 11 Create the file `/Library/LaunchDaemons/com.deluged.plist` containing the following: 11 12 {{{ 12 13 <?xml version="1.0" encoding="UTF-8"?> … … 18 19 <key>ProgramArguments</key> 19 20 <array> 20 <string>/opt/local/bin/deluged -2.7</string>21 <string>/opt/local/bin/deluged</string> 21 22 <string>-d</string> 22 23 </array> … … 32 33 33 34 34 Set the service to load on startup: 35 35 Set the service to load on startup and then start it: 36 36 {{{ 37 37 sudo launchctl load -w /Library/LaunchDaemons/com.deluged.plist 38 }}}39 40 To start it immediately without reboot:41 {{{42 38 sudo launchctl start com.deluged 43 39 }}} 44 40 41 == Logging == 42 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.: 45 43 44 {{{ 45 <string>/opt/local/bin/deluged</string> 46 <string>-d</string> 47 <string>-L</string> 48 <string>error</string> 49 <string>-l</string> 50 <string>/Users/deluged/Library/Logs/deluged.log</string> 51 }}}