@@ -78,6 +78,29 @@ cd $openenergymonitor_dir/EmonScripts/update
7878
7979# -----------------------------------------------------------------
8080
81+ if [ " $type " == " all" ] || [ " $type " == " emonhub" ]; then
82+ echo " Start emonhub update script:"
83+ $openenergymonitor_dir /EmonScripts/update/emonhub.sh
84+ echo
85+ fi
86+
87+ # -----------------------------------------------------------------
88+
89+ if [ " $type " == " all" ] || [ " $type " == " emoncms" ]; then
90+ echo " Start emoncms update:"
91+ $openenergymonitor_dir /EmonScripts/update/emoncms_core.sh
92+ $openenergymonitor_dir /EmonScripts/update/emoncms_modules.sh
93+ echo
94+ fi
95+
96+ # -----------------------------------------------------------------
97+
98+ if [ " $type " == " all" ] && [ " $emonSD_pi_env " = " 1" ]; then
99+ $openenergymonitor_dir /EmonScripts/update/emonsd.sh
100+ fi
101+
102+ # -----------------------------------------------------------------
103+
81104if [ " $type " == " all" ] || [ " $type " == " firmware" ]; then
82105
83106 if [ " $firmware " == " emonpi" ]; then
99122
100123# -----------------------------------------------------------------
101124
102- if [ " $type " == " all" ] || [ " $type " == " emonhub" ]; then
103- echo " Start emonhub update script:"
104- $openenergymonitor_dir /EmonScripts/update/emonhub.sh
125+ if [ " $hardware " == " EmonPi" ]; then
105126 echo
106- fi
107-
108- # -----------------------------------------------------------------
109-
110- if [ " $type " == " all" ] || [ " $type " == " emoncms" ]; then
111- echo " Start emoncms update:"
112- $openenergymonitor_dir /EmonScripts/update/emoncms_core.sh
113- $openenergymonitor_dir /EmonScripts/update/emoncms_modules.sh
127+ # Wait for update to finish
128+ echo " Starting emonPi LCD service.."
129+ sleep 5
130+ sudo service emonPiLCD restart
114131 echo
115132fi
116133
117134# -----------------------------------------------------------------
118135
119- if [ " $type " == " all" ] && [ " $emonSD_pi_env " = " 1" ]; then
120- $openenergymonitor_dir /EmonScripts/update/emonsd.sh
121- fi
122-
123- # -----------------------------------------------------------------
124-
125136datestr=$( date)
126137
127138echo
0 commit comments