This fixes the nesting case as before it would hit the first check,
which stops the job, then post-stop would unmount it.
Instead, lets just not start in containers, lxcfs is meant to run on the
host and be bind-mounted from there into containers.
Signed-off-by: Stéphane Graber <stgraber@ubuntu.com>
description "FUSE filesystem for LXC"
author "Stéphane Graber <stgraber@ubuntu.com>"
-start on starting lxc or runlevel [2345]
+start on not-container and (starting lxc or runlevel [2345])
stop on runlevel [06]
respawn
-pre-start script
- [ ! -d /var/lib/lxcfs/proc ] || { stop; exit 0; }
-end script
-
exec /usr/bin/lxcfs /var/lib/lxcfs
post-stop script