github twitter email rss
Ubuntu Upstart
0001 Jun 1
One minute read

Ubuntu Upstart

When a daemon cannot be simply run in the foreground, they fork. You can tell upstart to expect this.

  • expect fork - When a daemon forks exactly once (normal backgrounding)
  • expect daemon - When a daemon forks exactly twice (a daemon that does priv separation?)
  • expect stop - When a daemon emits SIGSTOP when it is done doing its thing

http://upstart.ubuntu.com/cookbook/#respawn

/etc/init/

service.conf

description     "Network License Manager (NLM)"

start on (net-device-up
      and local-filesystems
      and runlevel [2345])
stop on runlevel [016]

console output
umask 022
respawn
respawn limit 3 120
expect fork

env WORKDIR=/opt/flexnetserver

exec $WORKDIR/lmgrd -c $WORKDIR/autodesk.lic -l $WORKDIR/boot.log

post-start script
        $WORKDIR/lmutil lmdiag -n -c $WORKDIR/autodesk.lic >> $WORKDIR/boot_diagnostics.log
end script

Back to posts


comments powered by Disqus