Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if test -d "/mnt/iso/$1";
- then
- sudo umount /mnt/iso/$1
- sudo rm -r /mnt/iso/$1
- echo "/mnt/iso/$1 unmounted"
- if [ -z "$(ls -A /mnt/iso)" ]; then
- sudo rm -r /mnt/iso
- echo "No other ISOs mounted, so /mnt/iso was removed as well"
- fi
- else
- echo "path not mounted"
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement