How could be set in a OpenPli 6.x image a cyclic check (lets say every 5 minutes) of the WiFi connection? If the check fails, the network should be "automatically" restarted. I use OpenPli on a Vu+ Duo2, and sometimes the WiFi newtork "hangs" and needs to be restarted.
WiFi connection cyclic check
Re: WiFi connection cyclic check #2
Posted 22 June 2018 - 12:52
#!/bin/bash x=`ping -c1 -W4 ga.te.way.IP 2>&1 | grep 100%` if [ ! "$x" = "" ]; then command to restart network fiChange the gateway IP (normally router IP) and command to restart network. Someone here can tell you how to restart network on pli. Then a cronjob every 5 minutes executing above script. It would be better to fix the WiFi though.
Re: WiFi connection cyclic check #3
Posted 22 June 2018 - 13:00
It would be better to fix the WiFi though.
That. I never have a failing wifi on my VU Zero (which I use for fallback streaming).
You restart the network using
/etc/init.d/networking stop /etc/init.d/networking start
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: WiFi connection cyclic check #4
Posted 22 June 2018 - 14:20
Thank you very much for help. I dont know why sometimes WiFi connection gets lost, maybe a Vu+ Duo2 driver problem?
Where can I find a description about how to set a cronjon on OpenPli ?
Would this script (with the real router IP address) be correct, or are there some additional brackets needed?
#!/bin/bash
x=`ping -c1 -W4 ga.te.way.IP 2>&1 | grep 100%`
if [ ! "$x" = "" ]; then
/etc/init.d/networking stop
/etc/init.d/networking start
fi
Re: WiFi connection cyclic check #5
Posted 22 June 2018 - 14:22
To make cron available:
opkg install busybox-cron
To edit your crontab:
crontab -e
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: WiFi connection cyclic check #6
Re: WiFi connection cyclic check #7
Re: WiFi connection cyclic check #8
Posted 22 June 2018 - 15:35
Is it possible to edit the cron settings on PC and copy the file to the receiver?
Where is the crontab file located in the OpenPli image ?
Yes, as long as you use an editor that supports linux line-ends. The file is /var/spool/cron/root.
... and which is the recommended directory on OpenPli where to put the scripts scheduled by crontab?
There isn't any. I usually use /usr/local.
If you use autobackup, make sure you include this directory (and the cron directory) in the backup, so you don't loose it when you flash again.
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: WiFi connection cyclic check #9
Re: WiFi connection cyclic check #10
Posted 22 June 2018 - 15:48
Using the CRON daemon is very simple. Just use the Google search engine and you need to know the folder where the configuration files are located (/etc/cron/crontabs/root).
https://en.wikipedia.org/wiki/Cron
https://www.pantz.or...n/croninfo.html
https://www.computer...ix/ucrontab.htm
Warning:
The use of Shell for CRON configuration may vary from full Linux distributions, because only the limited command line (BusyBox) is used in the set top boxes. Some arguments (crontab -a) in the Shell set top box may not be the same or may be quite different. However, the format of CRON configuration files is almost always identical for all versions.
Before changing the configuration files, stop and then rerun the CRON daemon. An example for OpenATV (I do not know what it is in OpenPLi, sorry):
root@vusolose:~# sh /etc/init.d/crond stop Stopping crond: OK root@vusolose:~# sh /etc/init.d/crond start Starting crond: OK root@vusolose:~#
Edited by s3n0, 22 June 2018 - 15:51.
Re: WiFi connection cyclic check #11
Posted 22 June 2018 - 15:58
The above crontab config.file directory applies to OpenATV . Sorry.
Since it is not possible to edit the post again, then I write another.
For OpenPLi if the Crontab is installed (opkg install busybox-cron), the location of the configuration files is as stated above:
/var/spool/cron/crontabs
So, sorry for my mistake.
Edited by s3n0, 22 June 2018 - 16:01.
Re: WiFi connection cyclic check #12
Posted 22 June 2018 - 17:03
It is automatically created when you use "crontab -e", the official command to edit your crontab.
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: WiFi connection cyclic check #13
Posted 23 June 2018 - 00:11
Hi,
Small tip if you have some doubt about your Windows PC editor, once the file is edited on PC and send back to the STB simply connect to your STB in telnet, go into the file folder and tyle:
dos2unix MyFileName
This will "clean-up" the windows edited file to make it a clean Linux file.
Pr2
NO SUPPORT by PM, it is a forum make your question public so everybody can benefit from the question/answer.
If you think that my answer helps you, you can press the up arrow in bottom right of the answer.
Wanna help with OpenPLi Translation? Please read our Wiki Information for translators
Sat: Hotbird 13.0E, Astra 19.2E, Eutelsat5A 5.0W
VU+ Solo 4K: 2*DVB-S2 + 2*DVB-C/T/T2 (used in DVB-C) & Duo 4K: 2*DVB-S2X + DVB-C (FBC)
AB-Com: PULSe 4K 1*DVB-S2X (+ DVB-C/T/T2)
Edision OS Mio 4K: 1*DVB-S2X + 1*DVB-C/T/T2
Re: WiFi connection cyclic check #14
Posted 23 June 2018 - 12:00
After calling "crontab -e" an editor opened (I guess it is vi). I broke it with ZZ and now I have an empty "root" file under /etc/cron/crontabs.
The /var/spool/cron/crontabs directory still does not exist. Is /etc/cron/crontabs the right location ?
Could somebody help me please with some sample entries for the "root" crontab file ?
Edited by abra, 23 June 2018 - 12:03.
Re: WiFi connection cyclic check #15
Posted 23 June 2018 - 12:03
Unamed: 13E Quattro - 9E Quattro on IKUSI MS-0916
Re: WiFi connection cyclic check #16
Re: WiFi connection cyclic check #17
Posted 25 June 2018 - 11:08
No.
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
Re: WiFi connection cyclic check #18
Re: WiFi connection cyclic check #19
Posted 25 June 2018 - 16:26
There is a "system" crontab with is /etc/cron/root, and "user" crontabs which are in /etc/cron/crontabs/<username>.
I see that /var/spool/cron is a symlink to /etc/cron, so you should see the same in both. Not sure why that symlink is there, I assume for ease of backup (everything in /etc).
Currently in use: VU+ Duo 4K (2xFBC S2), VU+ Solo 4K (1xFBC S2), uClan Usytm 4K Pro (S2+T2), Octagon SF8008 (S2+T2), Zgemma H9.2H (S2+T2)
Due to my bad health, I will not be very active at times and may be slow to respond. I will not read the forum or PM on a regular basis.
Many answers to your question can be found in our new and improved wiki.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users