You are not logged in.

#1 2019-09-12 05:46:41

DYSEQTA
Member
Registered: 2019-09-12
Posts: 8

[SOLVED] systemd 243 Broke My Unit

This unit no longer works after upgrade to 243. Reverting to 242.84-2 returns it to function.

[Unit]
Description=rTorrent
Wants=network-online.target
After=network-online.target

[Service]
Type=forking
KillMode=none
RemainAfterExit=yes
User=rtorrent
ExecStartPre=/usr/bin/bash -c "if test -e /srv/rtorrent/session/rtorrent.lock && test -z `pidof rtorrent`; then rm -f /srv/rtorrent/session/rtorrent.lock; fi"
ExecStart=/usr/bin/tmux new-session -s rt -n rtorrent -d rtorrent
ExecStop=/usr/bin/tmux send-keys -t rt:rtorrent C-q
WorkingDirectory=%h
Restart=on-failure

[Install]
WantedBy=multi-user.target

Last edited by DYSEQTA (2019-09-18 01:14:10)

Offline

#2 2019-09-12 05:48:11

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] systemd 243 Broke My Unit

DYSEQTA wrote:

This unit no longer works...

https://bbs.archlinux.org/viewtopic.php?id=57855


Moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2019-09-18 01:13:49

DYSEQTA
Member
Registered: 2019-09-12
Posts: 8

Re: [SOLVED] systemd 243 Broke My Unit

I solved this myself. The new 243 version of systemd doesn't like %h for WorkingDirectory and was giving permission denied errors. I explicitly declared the home directory of the rtorrent user and it works again.

Offline

#4 2019-09-18 07:46:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,412

Re: [SOLVED] systemd 243 Broke My Unit

That's because %h doesn't do what you think it does

man systemd.unit wrote:

"%h"    User home directory    This is the home directory of the user running the service manager instance. In case of the system manager this resolves to "/root". Note that this setting is not influenced by the User= setting configurable in the [Service] section of the service unit.

which makes me wonder what weirdness happened to make this work before.

Offline

Board footer

Powered by FluxBB