either run this line direct (testing), put it in a script to run, or put it in cron to check every minute, will log time/date to op25.txt everytime it needs to restart
to generate a false positive for testing, adjust -n 10 to eg 100 to check more lines, if you recently had a tuning error, or change 'tuning error' to 'raspberrypi' (something that will be in the log)
Code:
journalctl -u op25-rx.service -n 10 | grep -q 'tuning error' && ( echo 'restarting'; sudo systemctl restart op25-rx; date >> /home/pi/op25.txt )
to generate a false positive for testing, adjust -n 10 to eg 100 to check more lines, if you recently had a tuning error, or change 'tuning error' to 'raspberrypi' (something that will be in the log)