[Deluge 2.x] systemctl service instantly exits on Raspberry Pi

General support for problems installing or using Deluge
Post Reply
inf
New User
New User
Posts: 2
Joined: Wed Apr 05, 2023 8:36 pm

[Deluge 2.x] systemctl service instantly exits on Raspberry Pi

Post by inf »

Running a fresh install of Bullseye on a Raspberry Pi 4: Linux influxssd 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Followed this guide: https://pimylifeup.com/raspberry-pi-deluge/

Running "deluged" and "deluge-web -f" from the command line works perfectly.

Adding the systemctl services doesn't work. Deluge exits (successfully) immediately:

Code: Select all

● deluged.service - Deluge Daemon
     Loaded: loaded (/etc/systemd/system/deluged.service; enabled; vendor preset: enabled)
     Active: inactive (dead) since Thu 2023-04-06 09:36:43 BST; 5min ago
    Process: 3886 ExecStart=/usr/bin/deluged -L debug -l /home/pi/deluged.log (code=exited, status=0/SUCCESS)
   Main PID: 3886 (code=exited, status=0/SUCCESS)
        CPU: 934ms

Apr 06 09:36:42 influxssd systemd[1]: Started Deluge Daemon.
Apr 06 09:36:43 influxssd systemd[1]: deluged.service: Succeeded.
The log file gets created but is blank:

Code: Select all

-rw-rw-rw- 1 pi   pi      0 Apr  6 09:36 deluged.log
I couldn't find any solution in this forum or Raspberry Pi based forums, so making a post in the hope that it's an obvious error and someone can point me in the right direction?

I don't understand why deluged works from the command line, but not via systemctl. The service file is very similar to that given in the documentation:

Code: Select all

[Unit]
Description=Deluge Daemon
After=network-online.target

[Service]
Type=simple
User=pi
Group=pi
UMask=007
ExecStart=/usr/bin/deluged
Restart=on-failure
TimeoutStopSec=300

[Install]
WantedBy=multi-user.target
mhertz
Moderator
Moderator
Posts: 2331
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Deluge 2.x] systemctl service instantly exits on Raspberry Pi

Post by mhertz »

Add the '-d' flag to deluged's systemd service file, and run 'sudo systemctl daemon-reload'. I read a few comments on that link, and it's deluge 2.x, so hence needs '-d' added, but the writter seemingly got confused and people reported misleading stuff to him, so he removed it again, and then I stopped reading more, but as deluge 2.x confirmed, then I know it needs '-d'.
inf
New User
New User
Posts: 2
Joined: Wed Apr 05, 2023 8:36 pm

Re: [Deluge 2.x] systemctl service instantly exits on Raspberry Pi

Post by inf »

Hallelujah! Thank you mhertz!

Glad it was such a simple fix.
Added -d to both service files, and they both survive a reboot. Perfect.

Thanks again for your speedy reply and spot-on resolution to the problem.
mhertz
Moderator
Moderator
Posts: 2331
Joined: Wed Jan 22, 2014 5:05 am
Location: Denmark

Re: [Deluge 2.x] systemctl service instantly exits on Raspberry Pi

Post by mhertz »

You're much welcome mate, thanks for posting back and your kind post :)
Post Reply