Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:osw3:pi
ZoneMinder
reload_config.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File reload_config.patch of Package ZoneMinder
From b215b50dabd2595f218f22b454666443c80941ae Mon Sep 17 00:00:00 2001 From: Dirk Hartmann <2monex@gmx.net> Date: Thu, 3 Apr 2014 20:13:44 +0200 Subject: [PATCH 4/7] reload_config.patch --- scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in | 12 ++++++++---- scripts/zmpkg.pl.in | 3 +++ 2 files changed, 11 insertions(+), 4 deletions(-) Index: zoneminder-1.36.4/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in =================================================================== --- zoneminder-1.36.4.orig/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in +++ zoneminder-1.36.4/scripts/ZoneMinder/lib/ZoneMinder/Config.pm.in @@ -72,9 +72,8 @@ use Carp; require ZoneMinder::Database; # Load the config from the database into the symbol table -BEGIN { -require ZoneMinder::Database; - +sub load_configuration +{ # Process name, value pairs from the main config file first process_configfile(ZM_CONFIG); @@ -147,7 +146,7 @@ require ZoneMinder::Database; close($CONFIG); } # end sub process_configfile -} # end BEGIN +} # end load_configuration sub loadConfigFromDB { print('Loading config from DB'); @@ -251,6 +250,11 @@ sub saveConfigToDB { $dbh->{AutoCommit} = $ac; } # end sub saveConfigToDB +BEGIN +{ + require ZoneMinder::Database; + load_configuration(); +} # end BEGIN 1; __END__ Index: zoneminder-1.36.4/scripts/zmpkg.pl.in =================================================================== --- zoneminder-1.36.4.orig/scripts/zmpkg.pl.in +++ zoneminder-1.36.4/scripts/zmpkg.pl.in @@ -167,6 +167,9 @@ if ( $command =~ /^(?:start|restart)$/ ) Debug("zmdc.pl check = $status"); if ( $status eq 'stopped' ) { + + ZoneMinder::Config::load_configuration(); + if ( $Config{ZM_DYN_DB_VERSION} and ( $Config{ZM_DYN_DB_VERSION} ne ZM_VERSION ) ) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor