Advertisement
Guest User

Untitled

a guest
Apr 13th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.68 KB | None | 0 0
  1. #!/bin/sh
  2. #
  3. # Run-level Startup script for curlftpfs
  4. #
  5. # chkconfig: 345 91 19
  6. # description: Startup/Shutdown the curlftpfs
  7.  
  8. FTP_HOST=MindYaBusiness
  9. FTP_MOUNT=/path/to/mindingBusiness
  10. FTP_USER=MindYaBusiness
  11. FTP_PASS=MindYaBusiness
  12.  
  13. # Create the mounted to dir if doesn't exist
  14. if [ ! -d $FTP_MOUNT ]; then
  15.     mkdir -p $FTP_MOUNT
  16. fi
  17.  
  18. case "$1" in
  19.     start)
  20.         curlftpfs $FTP_HOST $FTP_MOUNT -o user=$FTP_USER:$FTP_PASS,allow_other
  21.         ;;
  22.     stop)
  23.         fusermount -u $FTP_MOUNT
  24.         ;;
  25.     reload|restart)
  26.         $0 stop
  27.         $0 start
  28.         ;;
  29.     *)
  30.         echo "Usage: $0 start|stop|restart|reload"
  31.         exit 1
  32.         ;;
  33. esac
  34. exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement