#143: RFE: Running minisatip even after a crash!

Support forum for minisatip
Post Reply
lars18th

Post by lars18th »

Hi Catalin,

I have created a simple script for restarting minisatip when it crashes. I feel it can be interesting for other users that like to run it as a service. Perhaps you like to include it in the repository:

minisatip-infinite.sh
```
#!/bin/bash

# call with nohup ./minisatip-infinite.sh
until `./minisatip -f -ll`; do
echo Server minisatip crashed with exit code $?. Respawning.. >&2
sleep 1
done
```

Then when you like to kill minisatip, first kill the nohup process and after the minisatip instance.

You agree this?

User avatar
3PO
Posts: 5
Joined: Tue May 12, 2015 6:09 am

Post by 3PO »

I dont understand the sense of this script, becauce minisatip never crashed on my System.
catalinii
Posts: 0
Joined: Wed Nov 18, 2015 5:41 am

Post by catalinii »

I think the idea is good in general, as theoretically it could crash, but maybe the best solution would be to write like a watchdog that keeps it running until killed.

I will turn this into an RFE and when I will have time I will look how to achieve this from the code.
lars18th

Post by lars18th »

Hi Catalin,

Adding a watchdog inside the code can be a little complex. I suggest to use scripts to restart in case of crash because: 1) Is more portable; 2) Has low impact; 3) Can be disabled.

Perhaps you like to complete the script for better logging and signal control.

In any case, please, dont waste time on it! I put this thread only if someone likes to use it. ;-)
CvH

Post by CvH »

Instead of hacking scripts around minisatip it would be much more useful if we get Debian/Ubuntu/Redhat... repos and use their systems. The most users (besides OE & IDL4k) use a package management system, why not distribute a package with ready to use implementation.
lars18th

Post by lars18th »

@CvH

minisatip is very robust. This script is only for a forcing restart in case of a crash!

@catalinii
Breaking news: at time, tunning a TERRESTRIAL frequency with free-to-air programs the last version of minisatip has tried to call to the Oscam server, and then it crashed! I use the Oscam server only for sat. The only difference now is that at time the signal is very low on this frequency (heat/summer effect), and then when minisatip tries to read the tables, it fails/crash.
lars18th

Post by lars18th »

Hi,

My updated script, more robust and easy to show logs (I run it in a screen session):

```
#!/bin/bash

# call with nohup ./run-infinite.sh &
# exit with kill -9 [pid script]; kill -9 [pid minisatip];
# show log with tail -f minisatip.log

while :
do
./minisatip -f [...] -ll > ./minisatip.log
echo Server crashed with exit code $?. Respawning.. >&2
/bin/sleep 0.5
done
```
Note: [...] are your parameters for running minisatip

I suggest to use it for infinite running of minisatip!
Post Reply