From 7d211bbde22a3512b160d7b89a306690d2fedad2 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 23 May 2025 02:50:54 +0530 Subject: [PATCH] Add ZM_DIR_MODELS config entry --- conf.d/01-system-paths.conf.in | 4 ++++ src/zm_config.cpp | 2 ++ src/zm_config.h | 1 + 3 files changed, 7 insertions(+) diff --git a/conf.d/01-system-paths.conf.in b/conf.d/01-system-paths.conf.in index 3a047b008..e539dd36f 100644 --- a/conf.d/01-system-paths.conf.in +++ b/conf.d/01-system-paths.conf.in @@ -16,6 +16,10 @@ # The web account user must have full read/write permission to this folder. ZM_DIR_EVENTS=@ZM_DIR_EVENTS@ +# Full path to the folder models are stored in. +# The web account user must have read permission to this folder. +ZM_DIR_MODELS=@ZM_DIR_MODELS@ + # Foldername under the webroot where ZoneMinder looks for optional sound files # to play when an alarm is detected. ZM_DIR_SOUNDS=@ZM_DIR_SOUNDS@ diff --git a/src/zm_config.cpp b/src/zm_config.cpp index a37b7ce8c..331665287 100644 --- a/src/zm_config.cpp +++ b/src/zm_config.cpp @@ -180,6 +180,8 @@ void process_configfile(char const *configFile) { staticConfig.SERVER_ID = atoi(val_ptr); else if ( strcasecmp(name_ptr, "ZM_DIR_EVENTS") == 0 ) staticConfig.DIR_EVENTS = std::string(val_ptr); + else if ( strcasecmp(name_ptr, "ZM_DIR_MODELS") == 0 ) + staticConfig.DIR_MODELS = std::string(val_ptr); else if ( strcasecmp(name_ptr, "ZM_DIR_SOUNDS") == 0 ) staticConfig.DIR_SOUNDS = std::string(val_ptr); else if ( strcasecmp(name_ptr, "ZM_DIR_EXPORTS") == 0 ) diff --git a/src/zm_config.h b/src/zm_config.h index e275a2769..3a8c80a20 100644 --- a/src/zm_config.h +++ b/src/zm_config.h @@ -57,6 +57,7 @@ struct StaticConfig { std::string SERVER_NAME; unsigned int SERVER_ID; std::string DIR_EVENTS; + std::string DIR_MODELS; std::string DIR_SOUNDS; std::string DIR_EXPORTS; std::string PATH_ZMS;