faria
Senior Member
(Solved) Run script only if able to ping Google
Hi Guys,
Basically i want the router to update the host file from my adblock but only to do so if it can ping Google if not then quit.
here is my current script:
the new script would follow this logic:
(note)the script is run by a cronjob.
Any help writing this script is most welcome.
Hi Guys,
Basically i want the router to update the host file from my adblock but only to do so if it can ping Google if not then quit.
here is my current script:
Code:
#!/bin/sh
rm -f /tmp/adblock/hosts.downloaded
sh /jffs/scripts/adblock
Code:
#!/bin/sh
# if ping google successful then run the commands below, if not then quit.
rm -f /tmp/adblock/hosts.downloaded
sh /jffs/scripts/adblock
(note)the script is run by a cronjob.
Any help writing this script is most welcome.
Last edited: