Bugzilla – Attachment 75511 Details for
Bug 20692
koha-plack doesn't check for Include *-plack.conf line in /etc/apache2/sites-available/$INSTANCE.conf
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20692: Return and display and error if koha-plack failed
Bug-20692-Return-and-display-and-error-if-koha-pla.patch (text/plain), 2.38 KB, created by
Jonathan Druart
on 2018-05-23 18:08:45 UTC
(
hide
)
Description:
Bug 20692: Return and display and error if koha-plack failed
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-05-23 18:08:45 UTC
Size:
2.38 KB
patch
obsolete
>From 751b43a2a8c3344b1494f0d267e177185b1fac67 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 3 May 2018 17:10:33 -0300 >Subject: [PATCH] Bug 20692: Return and display and error if koha-plack failed > >If koha-plack did not comment/uncomment the line it should fails and >display an error instead of success. > >Useful for old apache config files >--- > debian/scripts/koha-plack | 12 ++++++++---- > 1 file changed, 8 insertions(+), 4 deletions(-) > >diff --git a/debian/scripts/koha-plack b/debian/scripts/koha-plack >index 1677ee0ec1..07a38874f4 100755 >--- a/debian/scripts/koha-plack >+++ b/debian/scripts/koha-plack >@@ -178,8 +178,10 @@ enable_plack() > > if ! is_plack_enabled $instancename; then > #Â Uncomment the plack related lines for OPAC and intranet >- sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:\1:' "$instancefile" >- sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:\1:' "$instancefile" >+ sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:\1:;q1' "$instancefile" \ >+ || { warn "Cannot enable plack for opac - update your apache config files" && return 1; } >+ sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:\1:;q1' "$instancefile" \ >+ || { warn "Cannot enable plack for intranet -- update your apache config files" && return 1; } > [ "${quiet}" != "yes" ] && warn "Plack enabled for ${instancename}" > return 0 > else >@@ -195,8 +197,10 @@ disable_plack() > > if is_plack_enabled $instancename; then > #Â Comment out the plack related lines for OPAC and intranet >- sed -i 's:^\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:#\1:' "$instancefile" >- sed -i 's:^\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:#\1:' "$instancefile" >+ sed -i 's:^\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:#\1:;q1' "$instancefile" \ >+ || { warn "Cannot disable plack for opac - update your apache config files" && return 1; } >+ sed -i 's:^\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:#\1:;q1' "$instancefile" \ >+ || { warn "Cannot disable plack for intranet - update your apache config files" && return 1; } > [ "${quiet}" != "yes" ] && warn "Plack disabled for ${instancename}" > return 0 > else >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 20692
:
75038
|
75040
|
75510
|
75511
|
75594
|
75597
|
88085
|
88698