transmission-daemon ignoring settings.json

After updating 16.04 LTS, systemd would not load my config file for transmission-daemon from the correct location.

I found a workaround at: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=734467

I tried the drop-in *.conf file in /etc/systemd/system/transmission.service.d/ to override ExecStart. However, using ps -ef | grep transmission I could see the wrong config location was still being used after reloads and restarts.

Reluctantly, I edited

/lib/systemd/system/transmission-daemon.service

to include the correct path by appending

-g /etc/transmission-daemon

to the ExecStart line.

[Unit]
Description=Transmission BitTorrent Daemon
After=network.target

[Service]
User=debian-transmission
Type=notify
ExecStart=/usr/bin/transmission-daemon -f --log-error -g /etc/transmission-daemon
ExecReload=/bin/kill -s HUP $MAINPID

[Install]
WantedBy=multi-user.target

I had the same problem just now; transmission-daemon.service decided to ignore my rpc-whitelist for whatever reason after I changed the user of the daemon. Jim Ladd's answer above is somewhat on the right track but editing systemd config files under /lib/systemd is a really bad idea because those edits wouldn't survive package upgrades. The correct way to edit a systemd config is to use systemd edit foo.service (which creates an override file in /etc/systemd/system/foo.service.d that works in conjunction with the existing config) or systemd edit --full foo.service (which creates /etc/systemd/system/foo.service that completely replaces the /lib/systemd/ version). To replace the ExecStart line, your override file should look like this:

# /etc/systemd/system/transmission-daemon.service.d/override.conf
[Service]
ExecStart=  # Clear existing ExecStart
ExecStart=/usr/bin/transmission-daemon -f --log-error -g /etc/transmission-daemon

Note however that overriding ExecStart isn't even necessary. transmission-daemon recognizes the TRANSMISSION_HOME env var, which works the same as -g, --config-dir. So, an easier override:

# A simpler and more robust /etc/systemd/system/transmission-daemon.service.d/override.conf
[Service]
Environment=TRANSMISSION_HOME=/etc/transmission-daemon