updated script

This commit is contained in:
2023-08-24 17:57:48 -05:00
parent 9890c6a163
commit 727c549a04

View File

@@ -3,43 +3,43 @@
if ping -c 1 192.168.1.41 &> /dev/null
then
# proxyserver
ssh plexserver "crontab -l | tee /home/akanealw/scripts/crontab.bak \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak \
ssh plexserver "crontab -l | tee /home/akanealw/scripts/crontab.bak > /dev/null 2>&1 \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak > /dev/null 2>&1 \
&& rm /home/akanealw/scripts/debian-essentials.sh > /dev/null 2>&1 \
&& rsync -azvP /home/akanealw/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/proxyserver/akanealw/ \
&& sudo rsync -azvP /root/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/proxyserver/root/"
# dockerserver
ssh dockerserver "crontab -l | tee /home/akanealw/scripts/crontab.bak \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak \
ssh dockerserver "crontab -l | tee /home/akanealw/scripts/crontab.bak > /dev/null 2>&1 \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak > /dev/null 2>&1 \
&& rm /home/akanealw/scripts/debian-essentials.sh > /dev/null 2>&1 \
&& rsync -azvPH /home/akanealw/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/dockerserver/akanealw/ \
&& sudo rsync -azvP /root/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/dockerserver/root/"
# plexserver
ssh plexserver "crontab -l | tee /home/akanealw/scripts/crontab.bak \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak \
ssh plexserver "crontab -l | tee /home/akanealw/scripts/crontab.bak > /dev/null 2>&1 \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak > /dev/null 2>&1 \
&& rm /home/akanealw/scripts/debian-essentials.sh > /dev/null 2>&1 \
&& rsync -azvP /home/akanealw/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/plexserver/akanealw/ \
&& sudo rsync -azvP /root/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/plexserver/root/"
# proxmox1
ssh proxmox1 "crontab -l | tee /home/akanealw/scripts/crontab.bak \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak \
ssh proxmox1 "crontab -l | tee /home/akanealw/scripts/crontab.bak > /dev/null 2>&1 \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak > /dev/null 2>&1 \
&& rm /home/akanealw/scripts/debian-essentials.sh > /dev/null 2>&1 \
&& rsync -azvP /home/akanealw/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/proxmox1/akanealw/ \
&& sudo rsync -azvP /root/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/proxmox1/root/"
# proxmox2
ssh proxmox2 "crontab -l | tee /home/akanealw/scripts/crontab.bak \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak \
ssh proxmox2 "crontab -l | tee /home/akanealw/scripts/crontab.bak > /dev/null 2>&1 \
&& sudo crontab -l | sudo tee /root/scripts/crontab.bak > /dev/null 2>&1 \
&& rm /home/akanealw/scripts/debian-essentials.sh > /dev/null 2>&1 \
&& rsync -azvP /home/akanealw/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/proxmox2/akanealw/ \
&& sudo rsync -azvP /root/scripts/ akanealw@fileserver:/home/akanealw/gitrepos/fileserver/files/bashscripts/proxmox2/root/"
# fileserver
crontab -l | tee /home/akanealw/scripts/crontab.bak
sudo crontab -l | sudo tee /root/scripts/crontab.bak
crontab -l | tee /home/akanealw/scripts/crontab.bak > /dev/null 2>&1
sudo crontab -l | sudo tee /root/scripts/crontab.bak > /dev/null 2>&1
rm /home/akanealw/scripts/debian-essentials.sh > /dev/null 2>&1
rsync -azvP /home/akanealw/scripts/ /home/akanealw/gitrepos/fileserver/files/bashscripts/fileserver/akanealw/
sudo rsync -azvP /root/scripts/ /home/akanealw/gitrepos/fileserver/files/bashscripts/fileserver/root/