Skip to content

Commit

Permalink
Fix regexp for retrive mosquitto 1.5 version number (#850)
Browse files Browse the repository at this point in the history
Fix regexp for retrive mosquitto 1.5 version number
  • Loading branch information
gablau authored and glynhudson committed May 30, 2018
1 parent 375bc86 commit a132400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/admin/admin_main_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ function disk_list()
}
if ($mqtt_enabled) {
?>
<tr><td><b>MQTT</b></td><td>Version</td><td><?php if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { echo "n/a"; } else { if (file_exists('/usr/sbin/mosquitto')) { echo exec('/usr/sbin/mosquitto -h | grep -oP \'(?<=mosquitto\sversion\s)[0-9.]+(?=\s*\(build)\''); } } ?></td></tr>
<tr><td><b>MQTT</b></td><td>Version</td><td><?php if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') { echo "n/a"; } else { if (file_exists('/usr/sbin/mosquitto')) { echo exec('/usr/sbin/mosquitto -h | grep -oP \'(?<=mosquitto\sversion\s)[0-9.]+(?=\s*)\''); } } ?></td></tr>
<tr><td class="subinfo"></td><td>Host</td><td><?php echo $system['mqtt_server']. ":" . $system['mqtt_port'] . ' (' . $system['mqtt_ip'] . ')'; ?></td></tr>
<?php
}
Expand Down

0 comments on commit a132400

Please sign in to comment.