@@ -, +, @@ --- debian/scripts/koha-plack | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) --- a/debian/scripts/koha-plack +++ a/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:q' "$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:q' "$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:q' "$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:q' "$instancefile" \ + || { warn "Cannot disable plack for intranet - update your apache config files" && return 1; } [ "${quiet}" != "yes" ] && warn "Plack disabled for ${instancename}" return 0 else --