Bypassing svscan
Daniel L. Miller
dmiller at amfes.com
Tue Apr 17 06:32:18 BST 2007
I'm trying to run some tools directly through upstart, instead of having
multiple control processes. I made an entry for dnscache:
# 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
exec envdir /var/lib/dnscache/env envuidgid dnscache softlimit -o250 -d
"$DATALIMIT" /usr/bin/dnscache
respawn
## EOF
This works just fine. But I can't log anything. I've tried building a
script that includes logging:
# 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
script
exec 2>&1
exec envdir /var/lib/dnscache/env \
envuidgid dnscache softlimit -o250 -d "$DATALIMIT"
/usr/bin/dnscache | \
setuidgid dnslog multilog t /var/log/djbdns/dnscache
end script
respawn
And while dnscache runs, and multilog starts - it seems the pipe never
gets created because multilog simply opens the logfile without writing
anything. Output of "ps ax | grep 'dns'":
13593 ? Ss 0:00 /bin/sh -e -c exec 2>&1?exec envdir
/var/lib/dnscache/env envuidgid dnscache softlimit -o250 -d "$DATALIMIT"
/usr/bin/dnscache | setuidgid dnslog multilog t
/var/log/djbdns/dnscache? /bin/sh
13594 ? S 0:00 /usr/bin/dnscache
13595 ? S 0:00 multilog t /var/log/djbdns/dnscache
Since I have no shell knowledge, I'm probably missing something basic.
Any ideas?
--
Daniel
More information about the upstart-devel
mailing list