]> git.proxmox.com Git - mirror_lxcfs.git/blobdiff - config/init/upstart/lxcfs.conf
set oom_score_adj of lxcfs process to -1000
[mirror_lxcfs.git] / config / init / upstart / lxcfs.conf
index 1252b2c8feff2bbd597e2464bd16c03e8e0990a3..7974068f1cbada231255a03381edaf5873081310 100644 (file)
@@ -1,14 +1,21 @@
 description "FUSE filesystem for LXC"
 author "Stéphane Graber <stgraber@ubuntu.com>"
 
-start on not-container and (starting lxc or runlevel [2345])
+start on starting lxc or starting lxd or runlevel [2345]
 stop on runlevel [06]
 
+oom score -1000
 respawn
 
+pre-start script
+    [ ! -e /run/container_type ] || { stop; exit 0; }
+end script
+
 exec /usr/bin/lxcfs /var/lib/lxcfs
 
 post-stop script
+    [ -e /run/container_type ] && exit
+
     # Cleanup in case of crash
     fusermount -u /var/lib/lxcfs 2> /dev/null || true
     [ -L /etc/mtab ] || \