change from backup.vpn to backup

This commit is contained in:
Jakobus Schürz 2023-02-14 08:50:10 +01:00
parent 988d59bf2c
commit 408670ca04

View file

@ -736,14 +736,14 @@ function tmuxx() {
function checkbkp() { function checkbkp() {
ENTRY ENTRY
if ping -c 3 backup.vpn >/dev/null 2>&1 ; then if ping -c 3 backup >/dev/null 2>&1 ; then
local SSH="/usr/bin/ssh" local SSH="/usr/bin/ssh"
local CMD="$SSH -T root@backup.vpn" local CMD="$SSH -T root@backup"
$CMD /bin/bash << EOF $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 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 EOF
else else
echo "backup.vpn is not reachable -> exit" echo "backup is not reachable -> exit"
return 1 return 1
fi fi
@ -751,16 +751,16 @@ EOF
} }
function checkbkp-full() { function checkbkp-full() {
ENTRY ENTRY
if ping -c 3 backup.vpn >/dev/null 2>&1 ; then if ping -c 3 backupn >/dev/null 2>&1 ; then
local SSH="/usr/bin/ssh" local SSH="/usr/bin/ssh"
local CMD="$SSH -T root@backup.vpn" local CMD="$SSH -T root@backup"
$CMD /bin/bash << EOF $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 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 EOF
command -v pdsh && pdsh -g vpn sudo systemctl status backup.service command -v pdsh && pdsh -g vpn sudo systemctl status backup.service
else else
logwarning "backup.vpn is not reachable -> exit" logwarning "backup is not reachable -> exit"
return 1 return 1
fi fi