raspberry
This commit is contained in:
1 parent
84dfdf5210
commit
be436085b3
55 files changed
+2195
No files matched your search
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
args=("$@")
|
||||
norm="\e[0m"
|
||||
blue="\e[34m"
|
||||
red="\e[31m"
|
||||
|
||||
printf "%s \t[$blue UP $norm]\n" "$(hostname)"
|
||||
for ((i=0; i < $#; i++))
|
||||
{
|
||||
ping -c 2 -W 1 -q ${args[$i]} 1>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
printf "%s \t[$blue UP $norm]\n" "${args[$i]}"
|
||||
else
|
||||
printf "%s \t[$red DOWN $norm]\n" "${args[$i]}"
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user