0

I am not sure why but transmission seems to be changing my settings on reboot. The folder where the settings are being held is /etc/transmission-daemon.

I run the command

sudo service transmission-daemon stop
then

sudo transmission-daemon --config-dir /folder/I/want

sudo service transmission-daemon start

However on reboot it switches to the etc folder, and I have to do the commands again.

My solution now is a bash script that does

sudo service transmission-daemon stop

sleep 4s

sudo transmission-daemon --config-dir /root/.config/transmission-daemon

with a cron

which works

However there should be way to get my changes to stick without the bash. When I put in the config command. I am just not sure how

2

This command

sudo transmission-daemon --config-dir /folder/I/want

doesn't alter any permanent configuration. It runs transmission-daemon and only this instance uses the directory you specified. Note the program places itself in the background, so it seems excessive to run sudo service transmission-daemon start just after.

Although the documentation says that $HOME/.config/transmission-daemon is the default location for daemon settings, it also says:

Some Linux distributions' start script for transmission-daemon use different location.

In Ubuntu /etc/default/transmission-daemon is the right place to modify --config-dir permanently. Relevant lines tailored to your request are:

CONFIG_DIR="/folder/I/want"
OPTIONS="--config-dir $CONFIG_DIR"

Note: the syntax is simple and straightforward; I expect it to fail if the path contains spaces. To use any valid path (with spaces etc.) one may fix it somehow (obligatorily with /etc/init.d/transmission-daemon or so) but this would be against the KISS principle. You can simply perform a trick I present down below.


An alternative permanent approach is to make your default config path a symlink to the desired real location:

sudo mv /etc/transmission-daemon/ /etc/transmission-daemon.old/
sudo ln -s "/folder/I/want" /etc/transmission-daemon

I tend to think that modifying config files is the right approach in general, the way it's meant to be, something by design; while a symlink may go as a cheap trick. This trick, however, can be very powerful and foolproof. As you can see it can compensate for some limitations of beautifully simple config syntax; or it can save you from learning some awfully complex config syntax, if you ever encounter one.

| improve this answer | |
  • Thank you for your answer. I think your first suggestion on how to fix the issue is best. I haven't quite gotten it to work, but will try again. Using Systemd till then. – snickerpop Apr 30 '18 at 21:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.