S
S
sergeynikolaevich2014-05-24 07:05:52
bash
sergeynikolaevich, 2014-05-24 07:05:52

bash/sh/csh script?

You need to create a script that will ping a specific host, and in the case of a ping timeout, it will perform some action, for example, call sendmail and send an email to [email protected]

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Valentine, 2014-05-24
@sergeynikolaevich

if ! ping -c2 -W2 192.168.1.1 > /dev/null; then 
   <твои-действия>
fi

And in his crown

R
Rostislav Grigoriev, 2014-05-24
@crazyzubr

Take this script as a basis and remake it so that there is no channel switching, but sending soap via sendmail.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question