May be you can use LSM http://lsm.foobar.fi/
LSM can be used to detect the internet connectivity status
On Mon, Jul 25, 2016 at 8:57 AM, Shrinivasan T <tshrinivasan@xxxxxxxxx>
I have a perl script in a desktop which is doing web scrawling
when the internet connection goes down sometimes, the script tries for 5
min. Then it dies.
I want the script to run again once the internet is connected,
How can we achieve this?
Thinking on writing a python script to do the following.
1. Check if the perl script is running.
2. Check if internet is working
3. if both script and internet are working, do nothing.
4. if internet is not there, kill the perl script
5. keep on looking for internet
6. once the internet is rady, start the perl script.
Have to run this script in cron for every two min.
I think there will be better ways to achieve this.
Please share your thoughts.
My Life with GNU/Linux : http://goinggnu.wordpress.com
Free E-Magazine on Free Open Source Software in Tamil : http://kaniyam.com
Get Free Tamil Ebooks for Android, iOS, Kindle, Computer :
ILUGC List: http://www.freelists.org/list/ilugc
ILUGC Web: http://ilugc.in/