Changes between Initial Version and Version 1 of UserGuide/Service/launchd


Ignore:
Timestamp:
09/29/2014 09:30:17 AM (8 years ago)
Author:
Cas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuide/Service/launchd

    v1 v1  
     1{{{#!comment 
     2Credit for the steps goes to: https://gist.github.com/j10io/6877030 
     3}}} 
     4 
     5Optionally create a new `deluge` user for running the service: http://support.apple.com/kb/PH6651 
     6 
     7To 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. 
     8 
     9''Note: The path to deluge assumes installation using Macports and will need modified if using `Deluge.app`.'' 
     10 
     11{{{ 
     12<?xml version="1.0" encoding="UTF-8"?> 
     13<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> 
     14<plist version="1.0"> 
     15<dict> 
     16<key>Label</key> 
     17<string>com.deluged</string> 
     18<key>ProgramArguments</key> 
     19<array> 
     20<string>/opt/local/bin/deluged-2.7</string> 
     21<string>-d</string> 
     22</array> 
     23<key>UserName</key> 
     24<string>deluge</string> 
     25<key>RunAtLoad</key> 
     26<true/> 
     27<key>KeepAlive</key> 
     28<true/> 
     29</dict> 
     30</plist> 
     31}}} 
     32 
     33 
     34Set the service to load on startup: 
     35 
     36{{{ 
     37sudo launchctl load -w /Library/LaunchDaemons/com.deluged.plist 
     38}}} 
     39 
     40To start it immediately without reboot: 
     41{{{ 
     42sudo launchctl start com.deluged 
     43}}} 
     44 
     45