I wholeheartedly agree that the upstream daemon (or whatever creates
the bloody pid file) should clean up the damn thing. But as you said,
for Lucid, we probably shouldn't go mucking about in the daemon's
internals.
What we could do is replicate that logic in the upstart job.
if [ -f /var/run/libvirtd.pid ]; then
if ps $(cat /var/run/libvirtd.pid) | grep -qs /usr/sbin/libvirtd; then
echo "libvirtd is already running, process " $(cat /var/run/libvirtd.pid)
else
echo "libvirtd is not running, but its pidfile exists...removing
that now..."
rm -f /var/run/libvirtd.pid
fi
fi
Loic- would something like this in the upstart job for Lucid make you happier?
Thanks for the research, Loic.
The logic is perfectly sound, to me.
I wholeheartedly agree that the upstream daemon (or whatever creates
the bloody pid file) should clean up the damn thing. But as you said,
for Lucid, we probably shouldn't go mucking about in the daemon's
internals.
What we could do is replicate that logic in the upstart job.
if [ -f /var/run/ libvirtd. pid ]; then libvirtd. pid) | grep -qs /usr/sbin/libvirtd; then libvirtd. pid) libvirtd. pid
if ps $(cat /var/run/
echo "libvirtd is already running, process " $(cat /var/run/
else
echo "libvirtd is not running, but its pidfile exists...removing
that now..."
rm -f /var/run/
fi
fi
Loic- would something like this in the upstart job for Lucid make you happier?