]>
git.proxmox.com Git - mirror_lxcfs.git/blob - config/init/sysvinit/lxcfs
4 # Short-Description: FUSE filesystem for LXC
5 # Description: FUSE filesystem for LXC
7 # Required-Start: $remote_fs
8 # Required-Stop: $remote_fs
9 # Default-Start: 2 3 4 5
15 DESC
="FUSE filesystem for LXC"
16 PIDFILE
=/var
/run
/lxcfs.pid
18 .
/lib
/lsb
/init-functions
20 test -f ${DAEMON} ||
exit 0
24 START
="-m --start --quiet --pidfile ${PIDFILE} --name ${NAME} --startas $DAEMON --background"
27 if init_is_upstart
; then
31 # Don't start if bind-mounted from host
32 [ ! -d /var
/lib
/lxcfs
/proc
] ||
exit 0
34 # Cleanup in case of crash
35 fusermount
-u /var
/lib
/lxcfs
2> /dev
/null || true
37 sed -i "/^lxcfs \/var\/lib\/lxcfs fuse.lxcfs/d" /etc
/mtab
39 echo -n "Starting $DESC: "
40 if start-stop-daemon
${START} -- /var
/lib
/lxcfs
>/dev
/null
2>&1 ; then
43 if start-stop-daemon
--test ${START} >/dev
/null
2>&1; then
47 echo "${DAEMON} already running."
56 if init_is_upstart
; then
59 echo -n "Stopping $DESC: "
60 if start-stop-daemon
--stop --quiet --pidfile ${PIDFILE} \
61 --startas ${DAEMON} --retry 10 --name ${NAME} \
62 >/dev
/null
2>&1 ; then
65 if start-stop-daemon
--test ${START} >/dev
/null
2>&1; then
78 if init_is_upstart
; then
81 status_of_proc
-p ${PIDFILE} "${DAEMON}" lxcfs
85 if init_is_upstart
; then
93 echo "Usage: $0 {start|stop|restart|force-reload}" 1>&2