Bypassing svscan

Daniel L. Miller dmiller at amfes.com
Sat May 19 18:11:20 BST 2007


Daniel Exbrayat wrote:
> I have tested the following. It is intended to bypass "svscan" and "supervise" daemons. 
> You have to note that "multilog" is not started as a service as it should be.
> It is not a "production" solution, more something to understand how put stuff together.
>   
I did think about named pipes - but I didn't know how to use them.  It's 
still not working right within upstart - here's my current attempt:

# dnscache
#
# This task runs the dnscache server.

start on runlevel-1
start on runlevel-2
start on runlevel-3
start on runlevel-4
start on runlevel-5
start on runlevel-6

stop on shutdown

start script
    exec mkfifo /var/lib/dnscache/log/multilog
    exec chown dnscache.nogroup /var/lib/dnscache/log/multilog
end script

script
    #### if I put any of the redirects here dnscache doesn't start ####
    exec envdir /var/lib/dnscache/env \
        envuidgid dnscache softlimit -o250 -d "$DATALIMIT" \
        /usr/bin/dnscache
end script
respawn

stop script
    exec rm /var/lib/dnsccahe/log/multilog
end script

console output /var/lib/dnscache/log/multilog

-- 
Daniel




More information about the upstart-devel mailing list