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?
#143: RFE: Running minisatip even after a crash!
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.
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
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.
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.
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!
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!