From 2e2851dc13d73352530dd4495c7e05603b2e520d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 10 Apr 2024 23:38:38 +0200 Subject: Adding upstream version 2.1.2~dev0+20240219. Signed-off-by: Daniel Baumann --- docs/source/how-to/launchd-service.md | 50 +++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 docs/source/how-to/launchd-service.md (limited to 'docs/source/how-to/launchd-service.md') diff --git a/docs/source/how-to/launchd-service.md b/docs/source/how-to/launchd-service.md new file mode 100644 index 0000000..53c21be --- /dev/null +++ b/docs/source/how-to/launchd-service.md @@ -0,0 +1,50 @@ +# How to create launchd services for macOS + +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 help] steps. + +The paths to `deluged` and `deluge-web` assumes installation using [Homebrew] +and will need modified if using other installation methods e.g. `Deluge.app`. + +## Daemon (deluged) service + +Create the file `/Library/LaunchDaemons/org.deluge-torrent.deluged.plist` +containing the following: + +```{eval-rst} +.. literalinclude:: ../../../packaging/osx/launchd/org.deluge-torrent.deluged.plist + :language: xml +``` + +Set the service to load on startup and then start it: + +```console +sudo launchctl load -w /Library/LaunchDaemons/org.deluge-torrent.deluged.plist +sudo launchctl start org.deluge-torrent.deluged +``` + +## Web UI (deluge-web) service + +Create the file `/Library/LaunchDaemons/org.deluge-torrent.deluge-web.plist` +containing the following: + +```{eval-rst} +.. literalinclude:: ../../../packaging/osx/launchd/org.deluge-torrent.deluge-web.plist + :language: xml +``` + +Set the service to load on startup and then start it: + +```console +sudo launchctl load -w /Library/LaunchDaemons/org.deluge-torrent.deluge-web.plist +sudo launchctl start org.deluge-torrent.deluge-web +``` + +## Logging + +Logging is enabled by default in the above script, error level, and can be +modified as required. + +[apple help]: https://support.apple.com/en-gb/guide/mac-help/mtusr001/mac +[homebrew]: https://brew.sh/ -- cgit v1.2.3