Bug 25510: Fix syntax error in koha-common.postinst
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 15 May 2020 08:12:46 +0000 (10:12 +0200)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Tue, 19 May 2020 07:28:50 +0000 (08:28 +0100)
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

debian/koha-common.postinst

index 46bc087..f14b031 100644 (file)
@@ -136,7 +136,7 @@ log4perl_component()
     local config=$1
     local component=$2
 
-    if [ grep -q -x "log4perl.logger.$component" $config ]; then
+    if grep -q -x "log4perl.logger.$component" $config; then
         return 0
     else
         return 1
@@ -146,7 +146,7 @@ log4perl_component()
 # 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
+    if !log4perl_component $log4perl_config "z3950"; then
         cat <<EOF >> $log4perl_config
 log4perl.logger.z3950 = WARN, Z3950
 log4perl.appender.Z3950=Log::Log4perl::Appender::File
@@ -159,7 +159,7 @@ log4perl.appender.Z3950.utf8=1
 EOF
     fi
 
-    if [ !log4perl_component $log4perl_config "api" ]; then
+    if !log4perl_component $log4perl_config "api"; then
         cat <<EOF >> $log4perl_config
 log4perl.logger.api = WARN, API
 log4perl.appender.API=Log::Log4perl::Appender::File
@@ -175,7 +175,7 @@ done
 
 for site in $(koha-list); do
     log4perl_config="/etc/koha/sites/$site/log4perl.conf"
-    if [ !log4perl_component $log4perl_config "sip" ]; then
+    if !log4perl_component $log4perl_config "sip"; then
         cat <<EOF >> $log4perl_config
 log4perl.logger.sip = DEBUG, SIP
 log4perl.appender.SIP=Log::Log4perl::Appender::File