1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/init.d/osecfs_downloads Thu Feb 27 17:12:59 2014 +0100
1.3 @@ -0,0 +1,50 @@
1.4 +#! /bin/sh
1.5 +### BEGIN INIT INFO
1.6 +# Provides: osecfsmount
1.7 +# Required-Start: $all
1.8 +# Required-Stop:
1.9 +# Default-Start: 2 3 4 5
1.10 +# Default-Stop: 0 1 6
1.11 +# Short-Description: Mounts /home/osecuser/Downloads to /var/run/Downloads with osecfs
1.12 +# Description: Mounts /home/osecuser/Downloads to /var/run/Downloads with osecfs
1.13 +### END INIT INFO
1.14 +
1.15 +do_start () {
1.16 + #
1.17 + # If login delaying is enabled then remove the flag file
1.18 + #
1.19 + mkdir -p /var/run/Downloads
1.20 + /usr/bin/osecfs /etc/osecfs/osecfs_downloads.cfg /var/run/Downloads ro
1.21 +}
1.22 +
1.23 +do_status () {
1.24 + /bin/df -hT
1.25 +}
1.26 +
1.27 +do_stop () {
1.28 + /bin/umount /var/run/Downloads
1.29 + rmdir /var/run/Downloads
1.30 +}
1.31 +
1.32 +case "$1" in
1.33 + start)
1.34 + do_start
1.35 + ;;
1.36 + restart|reload|force-reload)
1.37 + echo "Error: argument '$1' not supported" >&2
1.38 + exit 3
1.39 + ;;
1.40 + stop)
1.41 + do_stop
1.42 + ;;
1.43 + status)
1.44 + do_status
1.45 + exit $?
1.46 + ;;
1.47 + *)
1.48 + echo "Usage: $0 start|stop" >&2
1.49 + exit 3
1.50 + ;;
1.51 +esac
1.52 +
1.53 +: