[Bug 1031035] Re: Transmission daemon upstart support

Dmitrijs Ledkovs launchpad at surgut.co.uk
Tue Aug 21 19:39:34 UTC 2012


I see that you check if the transmission job is enabled within the the script.
Based on the upstart cookbook, it is more correct to:
* check conditions in pre-start script
* call `stop` which will prevent the current job from starting
* exit 0

See:
http://upstart.ubuntu.com/cookbook/#stop-a-job-from-running-if-its-configuration-file-has-not-been-created-modified

-- 
You received this bug notification because you are a member of Ubuntu
Sponsors Team, which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1031035

Title:
  Transmission daemon upstart support

Status in “transmission” package in Ubuntu:
  Confirmed

Bug description:
  I have attached an upstart script to run transmission-daemon with upstart instead of sysvinit.
  This has two advantages:

  1.
  Upstart supports graceful shutdown timeouts. This means upstart will
  wait for transmission to exit properly for an amount of time before
  killing it (in this script 30 seconds) which is useful if transmission
  needs to transmit a lot of status data to trackers on exiting.

  2.
  Upstart supports automatic respawning when transmission-daemon crashes /
  exits with a non-clean exit code. This happened to me quite regularly
  every couple of weeks and it's a helpful feature. With the default
  setting upstart will try to restart transmission up to 10 times with 5
  second intervals between the tries.

  For deployment, just copy the
  file into the debian directory and debhelper will take care of proper
  installation, no additional work needed. On debian were there is no
  upstart debhelper will just install the plain old init file, so no
  trouble there either.
  I tested the script on precise, it works very well for me but I'm sure additional testing will not hurt.

  Please feel free to publish this under any license / copyright /
  author / whatever you see fit. Hope this can be useful.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/transmission/+bug/1031035/+subscriptions



More information about the Ubuntu-sponsors mailing list