init.d/osecfs_downloads
author ft
Thu, 27 Feb 2014 17:12:59 +0100
changeset 0 60bc07f3f415
permissions -rwxr-xr-x
initial commit
     1 #! /bin/sh
     2 ### BEGIN INIT INFO
     3 # Provides:          osecfsmount
     4 # Required-Start:    $all
     5 # Required-Stop: 
     6 # Default-Start:     2 3 4 5
     7 # Default-Stop:	     0 1 6
     8 # Short-Description: Mounts /home/osecuser/Downloads to /var/run/Downloads with osecfs
     9 # Description:       Mounts /home/osecuser/Downloads to /var/run/Downloads with osecfs
    10 ### END INIT INFO
    11 
    12 do_start () {
    13 	#
    14 	# If login delaying is enabled then remove the flag file
    15 	#
    16 	mkdir -p /var/run/Downloads
    17 	/usr/bin/osecfs /etc/osecfs/osecfs_downloads.cfg /var/run/Downloads ro
    18 }
    19 
    20 do_status () {
    21 	/bin/df -hT
    22 }
    23 
    24 do_stop () {
    25 	/bin/umount /var/run/Downloads
    26 	rmdir /var/run/Downloads
    27 }
    28 
    29 case "$1" in
    30   start)
    31 	do_start
    32 	;;
    33   restart|reload|force-reload)
    34 	echo "Error: argument '$1' not supported" >&2
    35 	exit 3
    36 	;;
    37   stop)
    38 	do_stop
    39 	;;
    40   status)
    41 	do_status
    42 	exit $?
    43 	;;
    44   *)
    45 	echo "Usage: $0 start|stop" >&2
    46 	exit 3
    47 	;;
    48 esac
    49 
    50 :