Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- regex="plexdrive.*Could not update/save object"
- journalctl -f -n 0 |
- while read line
- do
- if [[ "$line" =~ $regexp ]]; then
- systemctl restart pd4g
- systemctl restart pd4x
- systemctl restart pd4n
- echo I restarted the service at $(date) >> /home/user/logs/log.txt
- /bin/sleep 30
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement