Start/stop as arguments to the job

Asked by Seshu Reddy Cheedepudi on 2010-12-11

Please excuse if this is trivial/implicit/already documented. But, my question is how can I pass the start/stop as an input argument to the job in an upstart task?

Eg:
start on starting gdm
stop on stopped gdm

exec /etc/mybashscript <start/stop based on event this is executed>

Question information

Language:
English Edit question
Status:
Solved
For:
upstart Edit question
Assignee:
No assignee Edit question
Solved by:
Scott James Remnant (Canonical)
Solved:
2010-12-14
Last query:
2010-12-14
Last reply:
2010-12-11

They already are arguments, the events are made of environment variables, e.g.

 start on starting gdm

 exec echo $UPSTART_START_EVENTS $JOB

Thanks Scott James Remnant (Canonical), that solved my question.