Commit 547135bb authored by Pavel Beketov's avatar Pavel Beketov

add ping_check.sh

parent 4d3be9b3
#!/bin/bash
HOST="ya.ru"
LOG_FILE="ping_check.log"
ping -c 1 $HOSTS > /dev/null
if [$? -ne 0]; then
echo "$(date): Host $HOST is down." >> $LOG_FILE
else
echo "$(date): Host $HOST is up." >> $LOG_FILE
fi
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment