Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- if ping -c 1 boomirka &> /dev/null
- then
- # echo "into main condition"
- if df -h | grep -i boomirka &> /dev/null
- then
- # echo "already mount"
- find /mnt/winshare/ -type f -name "*.torrent" -exec mv '{}' /sharedfolders/torrent_files/watch \;
- # elif ping -c 1 boomirka &> /dev/null
- # then
- # echo "$(date '+%d-%m-%Y_%H-%M-%S') host unreachable" >> /home/shabelski89/torren_auto_upload.txt
- else
- # echo "do mounting"
- mount -a
- echo "$(date '+%d-%m-%Y_%H-%M-%S') remount all device" >> /var/log/torren_auto_upload.txt
- fi
- else
- # echo "into else condition"
- echo "$(date '+%d-%m-%Y_%H-%M-%S') host unreachable" >> /var/log/torren_auto_upload.txt
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement