From 2d8e5833d7e5e7f7735c44f7dd56500b7edd1664 Mon Sep 17 00:00:00 2001 From: neodarz Date: Sun, 5 Aug 2018 10:43:02 +0200 Subject: Add script for test if list of domain is up --- scripts/.scripts/domainsTest.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100755 scripts/.scripts/domainsTest.sh (limited to 'scripts/.scripts') diff --git a/scripts/.scripts/domainsTest.sh b/scripts/.scripts/domainsTest.sh new file mode 100755 index 0000000..2b3151a --- /dev/null +++ b/scripts/.scripts/domainsTest.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Program name: pingall.sh +date +cat domains.txt | while read output +do + ping -c 1 "$output" &> /dev/null + if [ $? -eq 0 ]; then + echo "node $output is up" + else + echo "node $output is down" + fi +done -- cgit v1.2.1