simple upstart example

thufir hawat.thufir at gmail.com
Sat Dec 21 18:49:54 UTC 2013


I'm trying to understand upstart:

# status odd
odd stop/waiting
# start odd
odd start/running, process 11416    # Note this PID!
# status odd
odd start/running, process 11416
# initctl emit event-A
# status odd
odd start/running, process 11428    # Look! It changed!

http://upstart.ubuntu.com/cookbook/#if-job-is-not-currently-running



I also looked in /etc/init where some upstart config files are(?), and 
they seemed somewhat self-explanatory. This manual is huge, though.

For their example above, for job "odd", where do they define what "odd" 
is?  Can it be a bash script?  I have this script:

/home/thufir/cpuminer/minerd -o stratum+tcp://doge.pool.webxass.de:3333 -O 
<user>.<worker>:<worker_password>

but can't use cron to start that job because if the frequency is too short 
it starts a multitude of processes (a fork bomb?), yet if the frequency is 
too long then it defeats the purpose.

So, I think upstart is the way to go.  Just not positive *how* define job 
"odd".


-Thufir





More information about the ubuntu-users mailing list