deluge/docs/source/how-to/launchd-service.md
Calum Lind 24aa48187e [Docs] Replace recommonmark with MyST parser
We used recommonmark so that we can use markdown in sphinx but it is
buggy and now so switch to better supported MyST-parser.

* Fixed incorrect heading warnings in markdown.
* Added sphinx toctree to markdown using directive as required by MyST.
* Upgraded Sphinx to 4.3

Ref: https://myst-parser.readthedocs.io
2021-12-12 18:16:21 +00:00

51 lines
1.5 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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/