All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Looking For a Script That Can Do The Following
At script start-up it's only looking for a ping failure
step 1 - if success, Don't copy anything
step 2 ping failure, copy file A to folder
(failure 4 times before it copies file A to folder, if success before the 4th failure, go back to step 1)
After ping failure script is only looking for a ping success
step 3 - if failure, Don't copy anything
step 4 ping success, copy file B to folder
(success 4 times before it copies file B to folder, if failure before the 4th success, go back to step 3)
After ping success the script needs to go back to step 1 and look for ping failure,
I don't need the script to keep doing step 4 over and over because the server is now responding.
script for ubuntu 12.04/13.04
the script posted below by: SegmentationFault
i can use it with a very dirty work around,
but i am looking for a clean way to do it with just one script.
Comments
Well, in linux is easy, and windows, but it will be 2 scripts, not just 1
Use monit, it will ping and when a specific rule is met. Do a task.
deleted
http://mmonit.com/monit/documentation/monit.html
I meant 1 for windows, 1 for Linux.
Why do you need 2 scripts? A quick example for linux:
>
Thank you,
i can use it with a very dirty work around, i need something cleaner,
see description at top.
@SegmentationFault
it will work with a few modifications, i can do what i need using your script
to exec a "sed" command
thank you!
I have a simple ping monitor script that does a task when a service is down, and does another when the service comes back up. Perhaps you can modify it to your needs.
https://github.com/blackdotsh/ping-monitor