fix failing ping
This commit is contained in:
parent
e437585b31
commit
27d942a9b2
1 changed files with 14 additions and 1 deletions
15
functions.sh
15
functions.sh
|
@ -447,7 +447,20 @@ gnome-shell-extensions-enable-defaults () {
|
|||
}
|
||||
|
||||
checkbkp () {
|
||||
if ping -c 1 backup.vpn >/dev/null 2>&1 ; then
|
||||
if ping -c 3 backup.vpn >/dev/null 2>&1 ; then
|
||||
local SSH="/usr/bin/ssh"
|
||||
local CMD="$SSH -T backup.vpn"
|
||||
$CMD /bin/bash << EOF
|
||||
sudo find /srv/nfs/backup -mindepth 1 -maxdepth 1|grep -v -e "git$\|git-backup-repos"|while read i;do printf "%-30s%s\\n" "\$i" \$(ls \$i|tail -n1);done|sort -k 2.1 -r
|
||||
EOF
|
||||
else
|
||||
echo "backup.vpn is not reachable -> exit"
|
||||
return 1
|
||||
|
||||
fi
|
||||
}
|
||||
checkbkp-full () {
|
||||
if ping -c 3 backup.vpn >/dev/null 2>&1 ; then
|
||||
local SSH="/usr/bin/ssh"
|
||||
local CMD="$SSH -T backup.vpn"
|
||||
$CMD /bin/bash << EOF
|
||||
|
|
Loading…
Reference in a new issue