quiethost
This commit is contained in:
1 parent
9c379af76b
commit
b3c06c0a80
47 files changed
+2116
No files matched your search
@@ -0,0 +1,35 @@
|
||||
#!/bin/bash
|
||||
declare -a hosts=("serverhost" "workhost")
|
||||
date=$(date +"%m%d%H%M%S")
|
||||
ping -c 1 -m 1 ${hosts[0]} > /dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
PRE_STAT=1
|
||||
printf "%s down. WakeOnLan\n" "${hosts[0]}"
|
||||
bash /home/lucas/Documents/Dokumente/Dokumente/Projekte/Server/scripts/wol.sh serverhost
|
||||
else
|
||||
printf "%s up. Commence as planed\n" "${hosts[0]}"
|
||||
PRE_STAT=0
|
||||
fi
|
||||
#bash /home/lucas/Documents/Dokumente/Dokumente/Projekte/Server/scripts/wol.sh workhost
|
||||
ssh serverhost /home/lucas/scripts/smartctl.sh
|
||||
ssh serverhost /home/lucas/scripts/upgrade.sh
|
||||
if [ $? -ne 0 ];then
|
||||
printf "Update Failed\n"
|
||||
else
|
||||
printf "Update Finished\n"
|
||||
fi
|
||||
ssh serverhost /home/lucas/scripts/smartctl_long.sh
|
||||
if [ $? -ne 0 ];then
|
||||
printf "SMART Test Failed\n"
|
||||
else
|
||||
printf "SMART Test Started\n"
|
||||
fi
|
||||
ssh serverhost /home/lucas/scripts/backup_all.sh
|
||||
if [ $? -ne 0 ];then
|
||||
printf "Backup Failed\n"
|
||||
else
|
||||
printf "Finished Started\n"
|
||||
fi
|
||||
|
||||
# Shutdown when finished
|
||||
#/usr/bin/expect /home/lucas/Raspberry/scripts/shutdown.sh serverhost
|
||||
Reference in new issue
Block a user