Watchdog (Oscam): Unterschied zwischen den Versionen

Aus Tutorials
Zur Navigation springen Zur Suche springen
Zeile 35: Zeile 35:


== Script ==
== Script ==
=== Raspberry ===


<pre>
<pre>
Zeile 43: Zeile 45:
  else
  else
  rm $PIDFILE
  rm $PIDFILE
/usr/local/bin/oscam start > /dev/null
echo "OSCAM restarted at `date`" >> /var/log/oscam-crash.log
fi
</pre>
=== Receiver ===
<pre>
PID=$(pidof oscam_1.20-unstable-11682)
if (kill -0 $PID)
then
echo "it's alive!" >; /dev/null
else
  /usr/local/bin/oscam start > /dev/null
  /usr/local/bin/oscam start > /dev/null
  echo "OSCAM restarted at `date`" >> /var/log/oscam-crash.log
  echo "OSCAM restarted at `date`" >> /var/log/oscam-crash.log

Version vom 2. September 2023, 14:24 Uhr

Noch in Bearbeitung


verwandte Themen

Siehe auch: Startup-Scripte

Pfad

Raspberry:

sudo vi /usr/local/bin/oscam_watchdog.sh

Receiver:

sudo vi /usr/script/oscam_watchdog.sh

PID ermitteln

Raspberry:

pidof /usr/local/bin/oscam

Receiver:

pidof oscam_1.20-unstable-11682

Script

Raspberry

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

PID=$(pidof oscam_1.20-unstable-11682)
if (kill -0 $PID)
 then
 echo "it's alive!" >; /dev/null
 else
 /usr/local/bin/oscam start > /dev/null
 echo "OSCAM restarted at `date`" >> /var/log/oscam-crash.log
fi

Links

http://raspberry.tips/raspberrypi-tutorials/oscam-watchdog-fuer-den-raspberry-pi/


Zurück zu OSCam_(Raspberry), OSCam_(Satreceiver)