Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- while true; do
- read -p "Would you like to Mount, or Unmount? [M/U/E]::==>" mue
- echo
- case $mue in
- [Mm]* ) sudo mount -t cifs //12.0.0.9/Backups -o username=anonymous,password=,uid=1000,gid=1000 ~/NAS/Backups; sudo mount -t cifs //12.0.0.9/Shared/ -o username=anonymous,password=,uid=1000,gid=1000 ~/NAS/Shared/; echo "$(tput setaf 2)$(tput setab 7)$(tput bold)$(tput smul)MOUNTED$(tput sgr 0)"; sleep 2; clear; exit;;
- [Uu]* ) sudo umount ~/NAS/Backups; sudo umount ~/NAS/Shared; echo "$(tput setaf 1)$(tput setab 7)$(tput bold)$(tput smul)UNMOUNTED$(tput sgr 0)"; sleep 2; clear; exit;;
- [Ee]* ) sleep .2; clear; exit;;
- * ) echo "$(tput setaf 1)Please choose a valid response...$(tput sgr 0)";;
- esac
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement