This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
restart wlan9
#21
i am still waiting for the next crash, but this script should do the trick:
Code:
#!/bin/bash 
myIP=10.10.10.1
while :
do
    sleep 30;
    if ping -c 1 -W 1 "$myIP" 2>&1 > /dev/null ; then
          echo `date` "$myIP is alive"
    else
          echo `date` "$myIP is dead"
        logger "Trying to restart wlan9"
        /home/pi/.openplotter/start1.sh 
    fi
done
It needs to be run in the background, using nohup or some other way.
Reply


Messages In This Thread
restart wlan9 - by tobias.e - 2022-11-27, 09:09 AM
RE: restart wlan9 - by baltika_no_9 - 2022-11-27, 06:11 PM
RE: restart wlan9 - by tobias.e - 2022-11-28, 09:22 PM
RE: restart wlan9 - by baltika_no_9 - 2022-11-28, 11:38 PM
RE: restart wlan9 - by baltika_no_9 - 2022-12-01, 01:50 PM
RE: restart wlan9 - by holgerw - 2022-12-02, 03:29 AM
RE: restart wlan9 - by tobias.e - 2022-12-02, 07:28 AM
RE: restart wlan9 - by PaddyB - 2022-12-02, 08:39 AM
RE: restart wlan9 - by baltika_no_9 - 2022-12-02, 11:01 AM
RE: restart wlan9 - by tobias.e - 2022-12-03, 08:00 AM
RE: restart wlan9 - by baltika_no_9 - 2022-12-03, 02:09 PM
RE: restart wlan9 - by tobias.e - 2022-12-03, 07:47 PM
RE: restart wlan9 - by baltika_no_9 - 2022-12-03, 08:01 PM
RE: restart wlan9 - by tobias.e - 2022-12-04, 09:54 AM
RE: restart wlan9 - by baltika_no_9 - 2022-12-04, 01:09 PM
RE: restart wlan9 - by tobias.e - 2022-12-04, 05:13 PM
RE: restart wlan9 - by baltika_no_9 - 2022-12-04, 05:46 PM
RE: restart wlan9 - by tobias.e - 2022-12-04, 06:18 PM
RE: restart wlan9 - by baltika_no_9 - 2022-12-04, 07:10 PM
RE: restart wlan9 - by tobias.e - 2022-12-04, 07:32 PM
RE: restart wlan9 - by tobias.e - 2022-12-05, 07:29 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)