I am running an old macbook pro as a server and have deluged running on it.
How can I restart the daemon without having to restart my server each time?
I am running an old macbook pro as a server and have deluged running on it.
How can I restart the daemon without having to restart my server each time?
On macOS, you will generally create a launchd
configuration for a services - see deluge docs https://deluge.readthedocs.io/en/deluge-2.0.4/how-to/launchd-service.html
Pasted here:
Create the file
/Library/LaunchDaemons/org.deluge-torrent.deluged.plist
containing the following:<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>Label</key> <string>org.deluge-torrent.deluged</string> <key>ProgramArguments</key> <array> <string>/usr/local/bin/deluged</string> <string>-d</string> <string>-L</string> <string>error</string> <string>-l</string> <string>/var/log/deluged.log</string> </array> <key>StandardOutPath</key> <string>/tmp/deluged.stdout</string> <key>StandardErrorPath</key> <string>/tmp/deluged.stderr</string> <!-- To enable running as 'deluge' user remove comments. <key>UserName</key> <string>deluge</string> --> <key>RunAtLoad</key> <true/> <key>KeepAlive</key> <true/> </dict> </plist>
Set the service to load on startup, and then start it:
sudo launchctl load -w /Library/LaunchDaemons/org.deluge-torrent.deluged.plist sudo launchctl start org.deluge-torrent.deluged
You can then restart the service while running with sudo launchctl stop
and start
.
Note docs recommend (optionally) creating a new user deluge
for which to use this service. You'll have to edit the above depending on whether you create a deluge user or not.