Advertisement
shabelski89

check torrent files

Dec 3rd, 2019
517
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.79 KB | None | 0 0
  1. #!/bin/bash
  2. if ping -c 1 boomirka &> /dev/null
  3. then
  4. #        echo "into main condition"
  5.         if df -h | grep -i boomirka &> /dev/null
  6.         then
  7. #            echo "already mount"
  8.                 find /mnt/winshare/ -type f -name "*.torrent" -exec mv '{}'  /sharedfolders/torrent_files/watch \;
  9. #       elif ping -c 1 boomirka &> /dev/null
  10. #       then
  11. #            echo "$(date '+%d-%m-%Y_%H-%M-%S') host unreachable" >> /home/shabelski89/torren_auto_upload.txt
  12.         else
  13. #            echo "do mounting"
  14.              mount -a
  15.              echo "$(date '+%d-%m-%Y_%H-%M-%S') remount all device" >> /var/log/torren_auto_upload.txt
  16.         fi
  17. else
  18. #        echo "into else condition"
  19.         echo "$(date '+%d-%m-%Y_%H-%M-%S') host unreachable" >> /var/log/torren_auto_upload.txt
  20. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement