diff --git a/configure.ac b/configure.ac index 7ce0942a7..d1592368a 100644 --- a/configure.ac +++ b/configure.ac @@ -10,6 +10,7 @@ PATH_BUILD=`pwd` AC_SUBST(PATH_BUILD) TIME_BUILD=`date +'%s'` AC_SUBST(TIME_BUILD) +AC_SUBST(VERSION) AC_ARG_VAR(ZM_DB_HOST,[Hostname where ZoneMinder database located, default localhost]) AC_ARG_VAR(ZM_DB_NAME,[Name of ZoneMinder database, default zm]) diff --git a/scripts/zmdbbackup.in b/scripts/zmdbbackup.in index 303cf86be..37879b5f1 100644 --- a/scripts/zmdbbackup.in +++ b/scripts/zmdbbackup.in @@ -20,6 +20,8 @@ # Edit these to suit your configuration ZM_CONFIG=@ZM_CONFIG@ source $ZM_CONFIG +# ZM_VERSION in the config is now deprecated but will likely still exist in people's config files. This will override it. +ZM_VERSION=@VERSION@ MYSQLDUMP=/usr/bin/mysqldump BACKUP_PATH=/var/lib/zm diff --git a/scripts/zmeventdump.in b/scripts/zmeventdump.in index 342b665b0..fad82db37 100644 --- a/scripts/zmeventdump.in +++ b/scripts/zmeventdump.in @@ -23,6 +23,8 @@ # Edit these to suit your configuration ZM_CONFIG=@ZM_CONFIG@ +# ZM_VERSION in the config is now deprecated but will likely still exist in people's config files. This will override it. +ZM_VERSION=@VERSION@ MYSQLDUMP=/usr/bin/mysqldump # The rest should not need editing diff --git a/web/includes/config.php.in b/web/includes/config.php.in index b9f66449e..14a8215fb 100644 --- a/web/includes/config.php.in +++ b/web/includes/config.php.in @@ -22,6 +22,8 @@ // This section contains options substituted by the zmconfig.pl utility, do not edit these directly // define( "ZM_CONFIG", "@ZM_CONFIG@" ); // Path to config file +// Define, and override any given in config file +define( "ZM_VERSION", "@VERSION@" ); // Version $configFile = ZM_CONFIG; $localConfigFile = basename($configFile); diff --git a/zm.conf.in b/zm.conf.in index f4c426c65..65380a533 100644 --- a/zm.conf.in +++ b/zm.conf.in @@ -9,15 +9,9 @@ # or installations. # -# Current version of ZoneMinder -ZM_VERSION=@VERSION@ - -# Path to build directory +# Path to build directory, used mostly for finding DB upgrade scripts ZM_PATH_BUILD=@PATH_BUILD@ -# Path to installed data directory, used mostly for finding DB upgrade scripts -ZM_PATH_DATA=@PKGDATADIR@ - # Build time, used to record when to trigger various checks ZM_TIME_BUILD=@TIME_BUILD@ @@ -40,6 +34,9 @@ ZM_PATH_CGI=@CGI_PREFIX@ ZM_WEB_USER=@WEB_USER@ ZM_WEB_GROUP=@WEB_GROUP@ +# ZoneMinder database type: so far only mysql is supported +ZM_DB_TYPE=@ZM_DB_TYPE@ + # ZoneMinder database hostname or ip address ZM_DB_HOST=@ZM_DB_HOST@ @@ -51,3 +48,6 @@ ZM_DB_USER=@ZM_DB_USER@ # ZoneMinder database password ZM_DB_PASS=@ZM_DB_PASS@ + +# Host of this machine +ZM_SERVER_HOST=