It would be nice to introduce following changes to init.d startup script to allow multiple transmission instances through symlinked transmission init.d script and different conf.d files: run_dir=${rundir:-/var/run/transmission} pidfile=${pidfile:-${run_dir}/transmission.pid} download_dir=${download_dir:-/var/transmission/downloads} check_config() { if [ ! -d ${run_dir} ]; then mkdir ${run_dir} if [ -n "${runas_user}" ]; then chown -R ${runas_user} ${run_dir} fi fi Reproducible: Always
Created attachment 269905 [details] full init.d file
Created attachment 271535 [details, diff] transmission-daemon.initd.8.patch Thank you for report Oleg! Why do you need this? In any case... Here is updated patch: it allows to change config_dir too. I think it's not good idea for two instances of transmission-daemon share same config dir - it's quite possible that they'll start to overwrites each other settings. Do you agree? Could you please: 1. test this patch. 2. check that the following instructions are correct. # It's possible to run multiple instances of transmission daemon with different # settings. For that copy init.d script and corresponding conf.d configuration. # In each custom conf.d configuration uncomment and customize following lines: # transmission_prefix=/var/run/transmission # run_dir=${transmission_prefix}/rundir # config_dir=${transmission_prefix}/config # download_dir=${transmission_prefix}/download TIA
(In reply to comment #2) > Created attachment 271535 [details, diff] > transmission-daemon.initd.8.patch Suggested patch contains followin error: +run_dir=${rundir:-/var/run/transmission} Here you define run_dir variable. >+ if [ ! -d "${rundir}" ]; then >+ mkdir "${rundir}" but here used value of rundir, which in case when rundir is not defined in conf.d lead to create of undefined catalog. So it must be like: + if [ ! -d "${run_dir}" ]; then + mkdir "${run_dir}" We use multiple copies of transmission because we have couple of different purpose transmission copies on one server with different limits and passwords.
Comment on attachment 271535 [details, diff] transmission-daemon.initd.8.patch >--- /usr/portage/net-p2p/transmission/files/transmission-daemon.initd.7 2011-04-06 20:29:15.000000000 +0400 >+++ transmission-daemon.initd.8 2011-04-29 09:57:50.368031378 +0400 >@@ -1,7 +1,7 @@ > #!/sbin/runscript > # Copyright 1999-2011 Gentoo Foundation > # Distributed under the terms of the GNU General Public License v2 >-# $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/files/transmission-daemon.initd.7,v 1.1 2011/04/06 16:29:15 pva Exp $ >+# $Header: /var/cvsroot/gentoo-x86/net-p2p/transmission/files/transmission-daemon.initd.6,v 1.1 2011/02/12 01:47:49 pva Exp $ > > opts="start stop reload" > description="Transmission is a fast, easy and free bittorrent client" >@@ -9,9 +9,10 @@ > description_stop="Stop transmission-daemon server and web interface" > description_reload="Reload transmission-daemon settings" > >-pidfile=/var/run/transmission/transmission.pid >-config_dir=/var/transmission/config >-download_dir=/var/transmission/downloads >+rundir=${rundir:-/var/run/transmission} >+pidfile=${pidfile:-${run_dir}/transmission.pid} >+config_dir=${config_dir:-/var/transmission/config} >+download_dir=${download_dir:-/var/transmission/downloads} > logfile=${logfile:-/var/log/transmission/transmission.log} > runas_user=${runas_user:-transmission:transmission} > >@@ -22,8 +23,8 @@ > } > > check_config() { >- if [ ! -d /var/run/transmission/ ]; then >- mkdir /var/run/transmission/ >+ if [ ! -d "${rundir}" ]; then >+ mkdir "${rundir}" > if [ -n "${runas_user}" ]; then > chown -R ${runas_user} /var/run/transmission/ > fi
Created attachment 271543 [details, diff] transmission-daemon.initd.8.patch (In reply to comment #3) > Suggested patch contains followin error: > +run_dir=${rundir:-/var/run/transmission} Err, fixed (run_dir -> rundir) in this attachment (and ignore previous post, I've tried to fix attachment through web interface... > We use multiple copies of transmission because we have couple of different > purpose transmission copies on one server with different limits and passwords. Ok, I see. Thanks. I'll commit these changes with next version/revision bump. BTW, I still interested in positive test results )
Sorry for long wait. 1. +rundir=${rundir:-/var/run/transmission} +pidfile=${pidfile:-${run_dir}/transmission.pid} ${run_dir} in pid file is not defined 2. if [ -n "${runas_user}" ]; then chown -R ${runas_user} /var/run/transmission/ Here must be chown -R ${runas_user} ${rundir} Tested with this changes, all works well.
Thank you Oleg. Init script was added in 2.31-r1.