Hi,
I`m trying to monitor a connection lost which happened sporadically.
I tried to use the following script:
The ping is working, but when i timeout the log is not created...
any ideas what I`m doing wrong?
Thanks a lot.
I`m trying to monitor a connection lost which happened sporadically.
I tried to use the following script:
Code:
#!/bin/bash
ping $HOST 8.8.8.8
if [ $? -ne 0 ]; then
date > path/tmp/logfile.text
fi
The ping is working, but when i timeout the log is not created...
any ideas what I`m doing wrong?
Thanks a lot.
Last edited by a moderator: