Properly handle when zm installed on root directory (#12348)

Signed-off-by: Mark Hilbush <mark@hilbush.com>
This commit is contained in:
Mark Hilbush 2022-02-22 18:38:02 -05:00 committed by GitHub
parent 2e1ea32e8f
commit 307450352c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -48,7 +48,7 @@ The following configuration parameters are available on the Server thing:
| Host | host | Required | Host name or IP address of the ZoneMinder server. |
| Use secure connection | useSSL | Required | Use http or https for connection to ZoneMinder. Default is http. |
| Port Number | portNumber | Optional | Port number if not on ZoneMinder default port 80. |
| Url Path | urlPath | Required | Path where Zoneminder is installed. Default is /zm. |
| Url Path | urlPath | Required | Path where Zoneminder is installed. Default is /zm. Enter / if Zoneminder is installed under root directory. |
| Refresh Interval | refreshInterval | Required | Frequency in seconds at which monitor status will be updated. |
| Default Alarm Duration | defaultAlarmDuration | Required | Can be used to set the default alarm duration on discovered monitors. |
| Default Image Refresh Interval | defaultImageRefreshInterval | Optional | Can be used to set the image refresh interval in seconds on discovered monitors. Leave empty to not set an image refresh interval. |

View File

@ -146,7 +146,7 @@ public class ZmBridgeHandler extends BaseBridgeHandler {
host = config.host;
useSSL = config.useSSL.booleanValue();
portNumber = config.portNumber != null ? Integer.toString(config.portNumber) : null;
urlPath = config.urlPath;
urlPath = "/".equals(config.urlPath) ? "" : config.urlPath;
// If user and password are configured, then use Zoneminder authentication
if (config.user != null && config.pass != null) {