Merge pull request #200 from knnniggett/zm_path_data
Create ZM_PATH_DATA and point zmupdate to ZM_PATH_DATA/db
This commit is contained in:
commit
a248bc9a10
|
@ -324,6 +324,7 @@ set(ZM_PID "${ZM_RUNDIR}/zm.pid")
|
|||
set(ZM_CONFIG "/${CMAKE_INSTALL_SYSCONFDIR}/zm.conf")
|
||||
set(VERSION "${ZoneMinder_VERSION}")
|
||||
set(PATH_BUILD "${PROJECT_SOURCE_DIR}")
|
||||
set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder")
|
||||
set(TIME_BUILD "1000000") # Don't have a solution for this one yet
|
||||
set(BINDIR "${CMAKE_INSTALL_FULL_BINDIR}")
|
||||
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
|
|
|
@ -429,7 +429,7 @@ if ( $version )
|
|||
}
|
||||
else
|
||||
{
|
||||
$command .= ZM_PATH_BUILD."/db";
|
||||
$command .= ZM_PATH_DATA."/db";
|
||||
}
|
||||
$command .= "/zm_update-".$version.".sql";
|
||||
|
||||
|
@ -1030,7 +1030,7 @@ if ( $version )
|
|||
if ( $version ge '1.26.0' ) {
|
||||
|
||||
my @files;
|
||||
$updateDir = ZM_PATH_BUILD."/db" if ! $updateDir;
|
||||
$updateDir = ZM_PATH_DATA."/db" if ! $updateDir;
|
||||
opendir( my $dh, $updateDir ) || die "Can't open updateDir $!";
|
||||
@files = sort grep { (!/^\./) && /^zm_update\-[\d\.]+\.sql$/ && -f "$updateDir/$_" } readdir($dh);
|
||||
closedir $dh;
|
||||
|
|
|
@ -15,6 +15,9 @@ ZM_VERSION=@VERSION@
|
|||
# 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@
|
||||
|
||||
|
|
Loading…
Reference in New Issue