View | Details | Raw Unified | Return to bug 20692
Collapse All | Expand All

(-)a/debian/scripts/koha-plack (-5 / +25 lines)
Lines 178-185 enable_plack() Link Here
178
178
179
    if ! is_plack_enabled $instancename; then
179
    if ! is_plack_enabled $instancename; then
180
        # Uncomment the plack related lines for OPAC and intranet
180
        # Uncomment the plack related lines for OPAC and intranet
181
        sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:\1:' "$instancefile"
181
182
        sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:\1:' "$instancefile"
182
        if grep -q '^\s*#\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$' "$instancefile"; then
183
            sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:\1:' "$instancefile"
184
        else
185
            warn "Cannot enable plack for opac - update your apache config files"
186
            return 1
187
        fi
188
        if grep -q '^\s*#\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$' "$instancefile"; then
189
            sed -i 's:^\s*#\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:\1:' "$instancefile"
190
        else
191
            warn "Cannot enable plack for intranet -- update your apache config files"
192
            return 1
193
        fi
183
        [ "${quiet}" != "yes" ] && warn "Plack enabled for ${instancename}"
194
        [ "${quiet}" != "yes" ] && warn "Plack enabled for ${instancename}"
184
        return 0
195
        return 0
185
    else
196
    else
Lines 195-202 disable_plack() Link Here
195
206
196
    if is_plack_enabled $instancename; then
207
    if is_plack_enabled $instancename; then
197
        # Comment out the plack related lines for OPAC and intranet
208
        # Comment out the plack related lines for OPAC and intranet
198
        sed -i 's:^\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:#\1:' "$instancefile"
209
        if grep -q '^\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$' "$instancefile"; then
199
        sed -i 's:^\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:#\1:' "$instancefile"
210
            sed -i 's:^\(\s*Include /etc/koha/apache-shared-opac-plack.conf\)$:#\1:' "$instancefile"
211
        else
212
            warn "Cannot disable plack for opac - update your apache config files"
213
            return 1
214
        fi
215
        if grep -q '^\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$' "$instancefile"; then
216
            sed -i 's:^\(\s*Include /etc/koha/apache-shared-intranet-plack.conf\)$:#\1:' "$instancefile"
217
        else
218
            warn "Cannot disable plack for intranet - update your apache config files"
219
            return 1
220
        fi
200
        [ "${quiet}" != "yes" ] && warn "Plack disabled for ${instancename}"
221
        [ "${quiet}" != "yes" ] && warn "Plack disabled for ${instancename}"
201
        return 0
222
        return 0
202
    else
223
    else
203
- 

Return to bug 20692