diff --git a/updateTest.bash b/updateTest.bash index 62034bc4..2ca18e2c 100755 --- a/updateTest.bash +++ b/updateTest.bash @@ -15,30 +15,35 @@ ST="/tmp/summary.txt" rm -f $GUILog $GUIUpdate $CTLGUI $CTLH $ST touch "${HL}/LANforgeGUI_${verNum}/NO_AUTOSTART" -python3 ${scripts}/auto-install-gui.py --versionNumber $verNum &> $GUIUpdate -sleep 5 -grep -q "Current GUI version up to date" $GUIUpdate && exit -grep -q -i "fail" $GUIUpdate && exit - pgrep java &>/dev/null && killall -9 java -rm "${HL}/LANforgeGUI_${verNum}/NO_AUTOSTART" - +python3 ${scripts}/auto-install-gui.py --versionNumber $verNum &> $GUIUpdate +sleep 1 +rm -f "${HL}/LANforgeGUI_${verNum}/NO_AUTOSTART" ( cd $GUIDIR; nohup env RESTARTS=999999 ./lfclient.bash -s localhost &> $GUILog & ) sleep 10 -python3 ${scripts}/connectTest.py &> $CTLGUI - -touch "${HL}/LANforgeGUI_${verNum}/DAEMON_MODE" -pgrep java &>/dev/null && killall -9 java -sleep 10 -python3 ${scripts}/connectTest.py &> $CTLH -rm "${HL}/LANforgeGUI_${verNum}/DAEMON_MODE" - -pgrep java &>/dev/null && killall -9 java - +grep -q "Current GUI version up to date" $GUIUpdate && exit echo "===============================================" > $ST head $GUILog >> $ST echo "===============================================" >> $ST head $GUIUpdate >> $ST +if grep -q -i "fail" $GUIUpdate; then + cat $ST | mail -s 'GUI Update Test Failure' -a $GUILog -a $GUIUpdate "test.notice@candelatech.com" +fi + +#pgrep java &>/dev/null && killall -9 java +#( cd $GUIDIR; nohup env RESTARTS=999999 ./lfclient.bash -s localhost &> $GUILog & ) +python3 ${scripts}/connectTest.py &> $CTLGUI + +touch "${HL}/LANforgeGUI_${verNum}/DAEMON_MODE" + +pgrep java &>/dev/null && killall -9 java +sleep 10 + +python3 ${scripts}/connectTest.py &> $CTLH + +rm "${HL}/LANforgeGUI_${verNum}/DAEMON_MODE" +pgrep java &>/dev/null && killall -9 java + echo "===============================================" >> $ST head $CTLGUI >> $ST echo "===============================================" >> $ST