@@ -489,19 +489,19 @@ sub create_habridge_device {
489489 # Install new ha-bridge config file
490490 logger(" installing new ha-bridge/device.db file" );
491491 system (" sudo mv --backup=numbered /tmp/device.db /coachproxy/ha-bridge/" );
492+ }
493+
494+ # Install new node-red config files
495+ logger(" installing new flows_coachproxy.json file" );
496+ system (" sudo mv --backup=numbered /tmp/flows_coachproxy.json /coachproxy/node-red/" );
497+ system (' /usr/local/bin/mqtt-simple -h localhost -p "GLOBAL/SHUTDOWN" -m "Restarting CoachProxy..."' );
498+ sleep (1);
499+ if ($reboot ) {
500+ logger(" rebooting CoachProxyOS device" );
501+ system (" sudo /coachproxy/bin/safe_reboot" );
492502} else {
493- # Install new node-red config files
494- logger(" installing new flows_coachproxy.json file" );
495- system (" sudo mv --backup=numbered /tmp/flows_coachproxy.json /coachproxy/node-red/" );
496- system (' /usr/local/bin/mqtt-simple -h localhost -p "GLOBAL/SHUTDOWN" -m "Restarting CoachProxy..."' );
497- sleep (1);
498- if ($reboot ) {
499- logger(" rebooting CoachProxyOS device" );
500- system (" sudo /coachproxy/bin/safe_reboot" );
501- } else {
502- system (" /coachproxy/bin/version.sh" );
503- logger(" restarting node-red" );
504- # Note: if this script was called from within nodered, the below statement will kill this script.
505- system (" sudo systemctl restart nodered" );
506- }
503+ system (" /coachproxy/bin/version.sh" );
504+ logger(" restarting node-red" );
505+ # Note: if this script was called from within nodered, the below statement will kill this script.
506+ system (" sudo systemctl restart nodered" );
507507}
0 commit comments