@@ -, +, @@ $ koha-create --create-db test1 $ koha-create --create-db test2 $ docker run \ --volume=/path/to/your/clone:/koha \ --volume=/dest/path/for/debs:/debs \ --privileged --env VERSION=19.12.00.047 \ koha/koha-dpkg:master at the bottom: log4perl.logger.z3950 $ sudo dpkg -i koha-perldeps koha-deps koha-common --- debian/koha-common.postinst | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) --- a/debian/koha-common.postinst +++ a/debian/koha-common.postinst @@ -131,6 +131,34 @@ EOF fi fi +log4perl_component() +{ + local config=$1 + local component=$2 + + if [ grep -q -x "log4perl.logger.$component" $config ]; then + return 0 + else + return 1 + fi +} + +# Take care of the instance's log4perl.conf file +for site in $(koha-list); do + log4perl_config="/etc/koha/sites/$site/log4perl.conf" + if [ !log4perl_component $log4perl_config "z3950" ]; then + cat <> $log4perl_config +log4perl.logger.z3950 = WARN, Z3950 +log4perl.appender.Z3950=Log::Log4perl::Appender::File +log4perl.appender.Z3950.filename=/var/log/koha/$site/z3950-error.log +log4perl.appender.Z3950.mode=append +log4perl.appender.Z3950.layout=PatternLayout +log4perl.appender.Z3950.layout.ConversionPattern=[%d] [%p] %m %l %n + +EOF + fi +done + # Bug 14106 - fix the modulePath of existing koha instances so that it'll # continue to work. This will only patch the files if the exact original string # that we're fixing them from is there, so we just run it every time. Maybe --