]> git.proxmox.com Git - mirror_lxcfs.git/blob - config/init/upstart/lxcfs.conf
upstart: change how we decide to not run in a container
[mirror_lxcfs.git] / config / init / upstart / lxcfs.conf
1 description "FUSE filesystem for LXC"
2 author "Stéphane Graber <stgraber@ubuntu.com>"
3
4 start on starting lxc or starting lxd or runlevel [2345]
5 stop on runlevel [06]
6
7 respawn
8
9 pre-start script
10 [ ! -e /run/container_type ] || { stop; exit 0; }
11 end script
12
13 exec /usr/bin/lxcfs /var/lib/lxcfs
14
15 post-stop script
16 [ -e /run/container_type ] && exit
17
18 # Cleanup in case of crash
19 fusermount -u /var/lib/lxcfs 2> /dev/null || true
20 [ -L /etc/mtab ] || \
21 sed -i "/^lxcfs \/var\/lib\/lxcfs fuse.lxcfs/d" /etc/mtab
22 end script