35-live
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
cronVers=34-live # version of this script
|
cronVers=35-live # version of this script
|
||||||
sleepSecs=180 # seconds of warning to wait for user to log out
|
sleepSecs=180 # seconds of warning to wait for user to log out
|
||||||
log=$HOME/esp/install.log
|
log=$HOME/esp/install.log
|
||||||
|
|
||||||
@@ -21,8 +21,6 @@ function write_to_log() {
|
|||||||
echo -e "$1" >> $log
|
echo -e "$1" >> $log
|
||||||
}
|
}
|
||||||
|
|
||||||
startTime=$(date '+%s')
|
|
||||||
|
|
||||||
write_to_log " === $(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): new reinstall ==="
|
write_to_log " === $(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): new reinstall ==="
|
||||||
write_to_log "Cron version: ${cronVers}"
|
write_to_log "Cron version: ${cronVers}"
|
||||||
|
|
||||||
@@ -37,6 +35,8 @@ write_to_log "sleeping ${sleepSecs} seconds"
|
|||||||
sleep $sleepSecs
|
sleep $sleepSecs
|
||||||
return_status
|
return_status
|
||||||
|
|
||||||
|
startTime=$(date '+%s')
|
||||||
|
|
||||||
gitJobs=4
|
gitJobs=4
|
||||||
installDir=$HOME/esp
|
installDir=$HOME/esp
|
||||||
gitBranch=master
|
gitBranch=master
|
||||||
@@ -119,6 +119,10 @@ write_to_log $rebootMsg
|
|||||||
echo $rebootMsg | sudo write princesspi
|
echo $rebootMsg | sudo write princesspi
|
||||||
return_status
|
return_status
|
||||||
|
|
||||||
|
endTime=$(date '+%s')
|
||||||
|
timeElapsed=(($endTime-$startTime))
|
||||||
|
write_to_log "reinstall completed in $timeElapsed seconds"
|
||||||
|
|
||||||
write_to_log "$(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): sleeping ${sleepSecs} seconds"
|
write_to_log "$(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): sleeping ${sleepSecs} seconds"
|
||||||
sleep $sleepSecs
|
sleep $sleepSecs
|
||||||
return_status
|
return_status
|
||||||
@@ -127,11 +131,6 @@ write_to_log "$(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): sending final message and re
|
|||||||
echo "rebooting NOW bye bye" | sudo write $myUser
|
echo "rebooting NOW bye bye" | sudo write $myUser
|
||||||
return_status
|
return_status
|
||||||
|
|
||||||
endTime=$(date '+%s')
|
|
||||||
|
|
||||||
timeElapsed=(($endTime-$startTime))
|
|
||||||
write_to_log "reinstall completed in $timeElapsed seconds"
|
|
||||||
|
|
||||||
write_to_log " === $(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): finished ===\n"
|
write_to_log " === $(date '+%d/%m/%Y %H:%M:%S %Z (%s)'): finished ===\n"
|
||||||
|
|
||||||
sudo reboot
|
sudo reboot
|
||||||
|
|||||||
Reference in New Issue
Block a user