[wplug] Anyone out there really understand upstart...?

Pat Barron pat at lectroid.com
Wed Mar 19 17:29:04 EDT 2014


OK, I am trying to take something I normally would have done using a 
"traditional" init.d script, and translate it into similar function in 
upstart.  And I'm apparently just not getting it...

The "traditional" script would look something like:

    #!/bin/sh

    case "$0" in
        *start)
           /run/some/program
           ;;
        *stop)
           /run/different/program
           ;;
        *)
           echo $"Usage: $0 {start|stop}"
           exit 1
           ;;
        esac


Which would be put into /etc/init.d, and then links created in the 
/etc/rc?.d directories with link names that look like "SnnSCRIPTNAME" 
and "KnnSCRIPTNAME", to make the "start" and "stop" actions run as 
appropriate.

The programs being run perform a simple task to start up (or shut down, 
as appropriate) a service daemon, and then they exit.

I just can't figure out how to do basically the same thing using upstart 
(on RHEL 6), and I don't see anything in the documentation that would 
guide me.  You'd think this would be a common use case (migrating from a 
traditional init.d script to upstart) that they'd have a canned 
procedure for, but if there is one, I'm not finding it...

Any advice?

Thanks!
--Pat.


More information about the wplug mailing list