Advertisement
Guest User

Untitled

a guest
Aug 28th, 2018
759
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. #!/bin/bash
  2. regex="plexdrive.*Could not update/save object"
  3.  
  4. journalctl -f -n 0 |
  5. while read line
  6. do
  7. if [[ "$line" =~ $regexp ]]; then
  8. systemctl restart pd4g
  9. systemctl restart pd4x
  10. systemctl restart pd4n
  11. echo I restarted the service at $(date) >> /home/user/logs/log.txt
  12. /bin/sleep 30
  13. fi
  14. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement