Upstart has gained the ability to start a process after a socket is accessed, but I found the feature to be poorly documented. How is a socket-activated daemon and upstart config written?
Asked
Active
Viewed 1,357 times
1 Answers
2
I ran into an issue where I needed my upstart script to wait for the libvirt-bin socket, as you can't just used start on started libvirt-bin
because of this bug.
Anyway, I ended up making my upstart script like so:
start on socket PROTO=unix SOCKET_PATH=/var/run/libvirt/libvirt-sock
task
exec /data/configureESA.sh
Per the documentation referenced by @sr_:
The socket event is generated by the upstart-socket-bridge(8) daemon when a socket connection is made whose details match the socket event condition and environment specified in a jobs start on or stop on stanza.
start on socket PROTO=inet PORT=80 ADDR=127.0.0.1
start on socket PROTO=unix SOCKET_PATH=/var/run/.s.pgsql.1234
start on socket PROTO=unix SOCKET_PATH=@/at/upstart/example

zymhan
- 320
upstart-socket-bridge
and the referencedsocket-event
seem relevant. – sr_ May 10 '12 at 15:03