here is what I need it to do:
- check if I have internet connectivity... (I suppose it could be done by checking a ping response or something...?)
- if internet connection is present, than wait 1 hour,
if no internet than execute:- sudo eth0 down
stop process amule
stop process ktorrent
sudo /etc/init.d/moblock-nfq restart
wait 5 minutes
sudo eth0 up
resume process amule
resume process ktorrent
wait 1 hour and goto 1
- sudo eth0 down
- if internet connection is present, than wait 1 hour,
I simply don't know how to put this into something that the comp will understand, hence I am asking for help here...
FYI, moblock is a program I use to block blacklisted IP ranges to protect my privacy while using P2P.. it is the linux equivalent of Peerguardian... however I am having a particular problem with it - it seems to restart on it's own every morning and for some reason this automated restart is never completed fully and causes my comp to loose all internet connectivity... the manual restart resolves all the problems in 99% of cases...