aboutsummaryrefslogtreecommitdiff
path: root/scripts/.scripts
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-05 10:43:02 +0200
committerneodarz <neodarz@neodarz.net>2018-08-05 10:43:02 +0200
commit2d8e5833d7e5e7f7735c44f7dd56500b7edd1664 (patch)
tree0f224da7c06af747bcd24ed574a1bda82d9c2727 /scripts/.scripts
parentad862ab7082e523768efeb4685e1df596c034f23 (diff)
downloaddotfiles_ascii-2d8e5833d7e5e7f7735c44f7dd56500b7edd1664.tar.xz
dotfiles_ascii-2d8e5833d7e5e7f7735c44f7dd56500b7edd1664.zip
Add script for test if list of domain is up
Diffstat (limited to 'scripts/.scripts')
-rwxr-xr-xscripts/.scripts/domainsTest.sh12
1 files changed, 12 insertions, 0 deletions
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