]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/support-scripts/ac_ctl.pl
safer MR mapping
[Evergreen.git] / Open-ILS / src / support-scripts / ac_ctl.pl
1 #!/usr/bin/perl
2 use strict; use warnings;
3
4 use OpenSRF::AppSession;
5 use OpenSRF::System;
6 use OpenSRF::Utils::SettingsClient;
7 use OpenSRF::Utils::Cache;
8
9 my $config = shift;
10 my $command = shift;
11 die <<USAGE
12
13     Enables/disables added content lookups in apache.  This does not (currently)
14     include jacket image lookups, which are Apache rewrites
15
16     usage: perl $0 <bootstrap_config> [enable|disable]
17
18 USAGE
19     unless $command;
20
21 OpenSRF::System->bootstrap_client(config_file => $config);
22
23 my $cache = OpenSRF::Utils::Cache->new;
24 $cache->put_cache('ac.no_lookup', 1) if $command eq 'disable';
25 $cache->delete_cache('ac.no_lookup') if $command eq 'enable';
26
27