#!/bin/sh # /etc/rc.d/rc.lxcfs - FUSE filesystem for LXC handling PIDFILE=/var/run/lxcfs.pid start_lxcfs() { echo "Mounting FUSE filesystem for LXC" /usr/bin/lxcfs -p $PIDFILE /var/lib/lxcfs & } stop_lxcfs() { echo "Unmounting FUSE filesystem for LXC" kill -9 $PIDFILE /bin/fusermount -u /var/lib/lxcfs } restart_lxcfs() { stop_lxcfs sleep 1 start_lxcfs } case "$1" in 'start') start_lxcfs ;; 'stop') stop_lxcfs ;; 'restart') restart_lxcfs ;; *) echo "usage $0 start|stop|restart" esac