diff --git a/zmconfig.pl.in b/zmconfig.pl.in index 119c70c90..e44ed447d 100755 --- a/zmconfig.pl.in +++ b/zmconfig.pl.in @@ -87,6 +87,22 @@ my @options = type => $types{abs_path}, readonly => 1, }, + { + name => "ZM_WEB_PATH", + default => "@WEB_PREFIX@", + description => "Path to the ZoneMinder web files, autogenerated do not change", + help => "The path where the ZoneMinder web files are installed is set at configure time. This is a readonly option for the purposes of distributing this information around the various binaries and scripts that need to know it. Changing this option here will tend to break things. Instead re-run configure to regenerate the path." + type => $types{abs_path}, + readonly => 1, + }, + { + name => "ZM_CGI_PATH", + default => "@CGI_PREFIX@", + description => "Path to the ZoneMinder cgi files, autogenerated do not change", + help => "The path where the ZoneMinder cgi files are installed is set at configure time. This is a readonly option for the purposes of distributing this information around the various binaries and scripts that need to know it. Changing this option here will tend to break things. Instead re-run configure to regenerate the path." + type => $types{abs_path}, + readonly => 1, + }, { name => "ZM_WEB_USER", default => "@WEB_USER@", @@ -866,7 +882,8 @@ if ( $reprocess ) { print( "Processing '$config_file'\n" ); local $/ = undef; - open( CFG_IN_FILE, $config_file ) or die( "Can't open '$config_file' for reading" ); + my $config_z_file = $config_file.".z"; + open( CFG_IN_FILE, $config_z_file ) or die( "Can't open '$config_z_file' for reading" ); my $data = ; close( CFG_IN_FILE ); if ( $config_file =~ /\.h$/ ) @@ -968,10 +985,8 @@ if ( $reprocess ) warn( "Unrecognised file type '$config_file'" ); next; } - my $config_tmp_file = $config_file.".tmp"; - open( CFG_FILE, ">$config_tmp_file" ) or die( "Can't open '$config_tmp_file' for writing" ); + open( CFG_FILE, ">$config_file" ) or die( "Can't open '$config_file' for writing" ); print( CFG_FILE $data ); close( CFG_FILE ); - rename( $config_tmp_file, $config_file ) or warn( "Can't rename '$config_tmp_file' to '$config_file': $!" ); } }