summaryrefslogtreecommitdiffstats
path: root/docs/source/how-to/launchd-service.md
diff options
context:
space:
mode:
authorCalum Lind <calumlind@gmail.com>2019-06-18 00:01:03 +0100
committerCalum Lind <calumlind@gmail.com>2019-06-18 09:07:48 +0100
commitc1ba403d4e570defbec0f45a9d6cb8949ec663c7 (patch)
tree1055e721ddb20fe71a4e349aa0032dbeeee48547 /docs/source/how-to/launchd-service.md
parent8b62e50eb8bf81a177c4d62484a44b766c6f54a6 (diff)
downloaddeluge-c1ba403d4e570defbec0f45a9d6cb8949ec663c7.tar.gz
deluge-c1ba403d4e570defbec0f45a9d6cb8949ec663c7.tar.bz2
deluge-c1ba403d4e570defbec0f45a9d6cb8949ec663c7.zip
[Docs] Add service how-tos
Diffstat (limited to 'docs/source/how-to/launchd-service.md')
-rw-r--r--docs/source/how-to/launchd-service.md50
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/source/how-to/launchd-service.md b/docs/source/how-to/launchd-service.md
new file mode 100644
index 000000000..b988a19e3
--- /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/