init: support relation operators in env matches of start/stop conditions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
upstart |
Triaged
|
Wishlist
|
Unassigned | ||
upstart (Ubuntu) |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Binary package hint: upstart
Adding support for relation operators in the start/stop on stanza will benefit future upstart scripts. In particular it will help when upstart's scope grows to encompass cron and udev style services.
My particular use case:
a temperature monitoring daemon which emits events along the lines of
initctl emit coretemp TEMP=37
A second daemon that starts/stops depending on the current temperature.
it could have a .conf file
#cpu is too hot
start on cputemp TEMP>60
stop on cputemp TEMP<50
respawn
exec cpu-is-too-hot
It is currently very unwieldy to produce the start/stop on stanzas with only the equality comparisons.
start on cputemp TEMP=[6789]
stop on cputemp TEMP=[1234]
These do not even cover all the cases.
In general more powerful env matching syntax would help tremendously, adding relation operators should just be a first step.
Changed in upstart: | |
status: | New → Triaged |
importance: | Undecided → Wishlist |
Forwarding this to the upstream upstart project and marking Triaged/Wishlist in Ubuntu.