Watchdog (Oscam): Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(→Script) |
|||
Zeile 72: | Zeile 72: | ||
echo "it's alive!" >; /dev/null | echo "it's alive!" >; /dev/null | ||
else | else | ||
/usr/ | /usr/script/oscam_1.20-unstable-11682_cam.sh restart > /dev/null | ||
echo "OSCAM restarted at `date`" >> /var/log/oscam-crash.log | echo "OSCAM restarted at `date`" >> /var/log/oscam-crash.log | ||
fi | fi |
Version vom 2. September 2023, 14:40 Uhr
Noch in Bearbeitung
verwandte Themen
Siehe auch: Startup-Scripte
Raspberry
Noch in Bearbeitung
PID ermitteln
pidof /usr/local/bin/oscam
Script
sudo vi /usr/local/bin/oscam_watchdog.sh
PIDFILE=/var/run/oscam.pid if (kill -0 `cat $PIDFILE`) then echo "it's alive!" >; /dev/null else rm $PIDFILE /usr/local/bin/oscam start > /dev/null echo "OSCAM restarted at `date`" >> /var/log/oscam-crash.log fi
Receiver
Noch in Bearbeitung
Startscript ermitteln
Der Befehl
ls -la /etc/init.d/
sollte einen Eintrag wie folgenden ausgeben:
current_cam.sh -> /usr/script/oscam_1.20-unstable-11682_cam.sh
PID ermitteln
pidof oscam_1.20-unstable-11682
Script
vi /usr/script/oscam_watchdog.sh
PID=$(pidof oscam_1.20-unstable-11682) if (kill -0 $PID) then echo "it's alive!" >; /dev/null else /usr/script/oscam_1.20-unstable-11682_cam.sh restart > /dev/null echo "OSCAM restarted at `date`" >> /var/log/oscam-crash.log fi
chmod +x /usr/script/oscam_watchdog.sh
Links
http://raspberry.tips/raspberrypi-tutorials/oscam-watchdog-fuer-den-raspberry-pi/
Zurück zu OSCam_(Raspberry), OSCam_(Satreceiver)