Skip to content

Commit 66fb2e9

Browse files
committed
Modified README.md to touch on new local/vendor setup as well as added to skeleton files ezproxy-collaborate.cfg.skel
1 parent 4ac43de commit 66fb2e9

File tree

3 files changed

+29
-18
lines changed

3 files changed

+29
-18
lines changed

README.md

+26-17
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,32 @@ Templates are stored for each database family or groups. Various scripts can be
1717

1818
## Setup
1919

20-
Note, these instructions will refer to $EZPROXY_HOME, which is a placeholder for wherever you have ezproxy installed.
21-
22-
### Setting EzProxy Home to make the steps easier (optional)
23-
24-
if you are on a linux system running a bash shell, you can modify your ~/.bash_profile to include the following, replacing /usr/local/ezproxy with the path where the ezproxy binary exists.
25-
26-
````
27-
EZPROXY_HOME = /usr/local/ezproxy
28-
export EZPROXY_HOME
29-
````
30-
31-
Then type `source ~/.bash_profile` to reload.
20+
Note, these instructions will assume you have ezproxy setup in /usr/local/ezproxy. If you don't, just remember to change that in the following examples
3221

3322
### Set up directory
3423

35-
You will need a directory to contain the various ezproxy files. stanza-per-file `mkdir $EZPROXY_HOME/conf.d`
24+
You will need a directory to contain the various ezproxy files. stanza-per-file `mkdir /usr/local/ezproxy/conf.d`
3625

3726
### Checkout ezproxy-collaborate on your ezproxy machine (requires git to be installed for now)
3827

3928
````
29+
cd ~
4030
git clone - https://github.com/UIUCLibrary/ezproxy-collaborate.git
4131
cd ezproxy-collaborate
4232
````
4333

4434
Copy ezproxy-collaborate.cfg.skel to ezproxy-collaborate.cfg
4535
Edit ezproxy-colloborate.cfg and change the entry to reflect the current ezproxy conf.d directory you created above
4636
````
47-
ezproxy_config_dir = $EZPROXY_HOME/conf.d
48-
stanzas_include = $EZPROXY_HOME/stazas_include.cfg
37+
ezproxy_config_dir = /usr/local/ezproxy/conf.d
38+
stanzas_include = /usr/local/ezproxy/stazas_include.cfg
4939
````
5040

51-
### Modify config.txt
41+
### Modify the ezproxy config.txt
5242

5343
Add the line
5444
````
55-
IncludeFile $EZPROXY_HOME/stanzas_include.cfg
45+
IncludeFile /usr/local/ezproxy/stanzas_include.cfg
5646
````
5747
to the config.txt file.
5848

@@ -62,6 +52,7 @@ Then run `bin/generate-stanzas.pl` to create templates
6252
## Important files and file naming conventions
6353

6454
* stanzas.cfg has the institutional-specific information, such as passwords
55+
* templates are found in local and vendor, more on that below
6556
* template files end with either .template or _i.template. Use _i.template (ex. Books24x7_i.template) when there's information that will need to be supplied by the stanzas.cfg file. This way the generate-confgs.pl script can warn folks when they haven't added the corresponding stanza.
6657
* Files in conf.d should end in .stanza
6758
* stanzas_include.cfg - Apparently EzProxy doesn't allow for wildcards in the INcludeFile directive. However, you can include a file of IncludeFile. So the program always overwrites this file with the latest listings. Any additional stanzas added to conf.d but not in the templates should be included either in config.txt or in separate file.
@@ -78,6 +69,24 @@ Note this is really mean to help the process of migrating from one central confi
7869

7970
Right now this process ignores files w/ Option in them as well as lines of comments and whitespaces.
8071

72+
73+
## local and vendor directory.
74+
75+
Right now there's a vendor directory containing templates from various sources, it might look something like:
76+
77+
* vendor/
78+
* oclc/
79+
* ebsco/
80+
81+
You don't need to modify these files if you want to override them, instead you can create a local directory. Copy the vendor file in their and modify it.
82+
83+
You can even remove local from the .gitingore file and keep track of those local changes.
84+
85+
Any file in local with the same name as a file in vendor will "override" the vendor template. (The first instance of that file name in the vendor directories will override any following ones).
86+
87+
Right now the convention of numerical prefixes can make this a bit tricky, so be careful there. That might change based on user request.
88+
89+
8190
## Goals
8291

8392
Overall goal - a system that makes it easy to update and maintain ezproxy stanzas.

ezproxy-collaborate.cfg.skel

+2
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@
22
CONFIG_DIR = /usr/local/ezproxy/conf.d
33
INCLUDE_FILE=/usr/local/ezproxy/stanzas_include.cfg
44
TEMPLATE_DIR = templates
5+
TEMPLATE_LOCAL_DIR = local
6+
TEMPLATE_VENDOR_DIR = vendor
57
TEMPLATE_CONFIG = stanzas.cfg

lib/TemplatePaths.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ sub template_paths_array {
8484
path => $path_mappings->{$_} }
8585
} sort keys %{$path_mappings} ;
8686

87-
return \@template_paths ;
87+
return @template_paths ;
8888
}
8989

9090
sub add_paths {

0 commit comments

Comments
 (0)