Linux Blog

Perform an action when a host comes back

Filed under: Shell Script Sundays — TheLinuxBlog.com at 6:28 am on Sunday, October 24, 2010

Perform an action when host comes backI have in the past been lazy enough to not wait for a host to come back, yet need to do something when it comes back. Lets say starting up that service I never got around to creating startup scripts for, or uploading new firmware. Well, I found this little trick on NSLU2-linux.org

sudo arping -f  && echo "True"

Obviously the echo “True” can be replaced with whatever you wish. A sleep may be good if you want some extra time before performing the action. Pair this with a SSH identity / key pair and you can perform the actions on the host remotely.





Random Man Pages:
hier
nsc
lament
koi8-r

No Comments »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>