diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-05 10:43:02 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-05 10:43:02 +0200 |
commit | 2d8e5833d7e5e7f7735c44f7dd56500b7edd1664 (patch) | |
tree | 0f224da7c06af747bcd24ed574a1bda82d9c2727 /scripts/.scripts | |
parent | ad862ab7082e523768efeb4685e1df596c034f23 (diff) | |
download | dotfiles_ascii-2d8e5833d7e5e7f7735c44f7dd56500b7edd1664.tar.xz dotfiles_ascii-2d8e5833d7e5e7f7735c44f7dd56500b7edd1664.zip |
Add script for test if list of domain is up
Diffstat (limited to '')
-rwxr-xr-x | scripts/.scripts/domainsTest.sh | 12 |
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 |