first commit
This commit is contained in:
15
scripts/test_con_server_status.sh
Normal file
15
scripts/test_con_server_status.sh
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
#Roy Cohen
|
||||
# Test server conection to GW and whire the date and upteme to a logfile
|
||||
|
||||
status=$(ps -ef | grep test_con_server_status.sh | grep -v grep |wc -l)
|
||||
if [ "$status" -ge 3 ] ;
|
||||
then
|
||||
exit
|
||||
else
|
||||
while true
|
||||
do
|
||||
nc -z 10.2.1.1 22 && echo $(date && uptime) >> /var/log/custom/$HOSTNAME
|
||||
sleep 5
|
||||
done
|
||||
fi
|
Reference in New Issue
Block a user