EZProxy Stanza
Categories
Component ID
Component name
Component type
Maintenance status
Development status
Component security advisory coverage
Downloads
Component created
Component changed
Component body
This module helps you manage your EZProxy configuration files, and keeps your stanzas up to date with OCLC's stanzas.
Install
Install via composer require drupal/ezproxy_stanza
Requirements
- Drupal's private filesystem configured
- Git installed on your web server
- A private, hosted git repository in a management system such as GitLab or GitHub to store your EZProxy configuration files.
- cpliakas/git-wrapper (will automatically be installed if using composer)
- Weight module (will automatically be installed if using composer)
Enable
When you enable this module a git repository that stores a copy of all of OCLC's stanzas will be cloned onto your server in private://ezproxy_stanza/public/. This copy is not supported by OCLC. The stanzas are scraped over the web from OCLC's official site. Many stanzas have additional configuration instructions. If there are extra instructions detected the stanza will have a warning icon indicating such.
Each stanza will be imported into your system as a node when you enable the module.
Configure
- Assign the "EZProxy Admin" role to users you want to be able to make changes to your EZProxy configuraton files
- Go to /admin/content/ezproxy/settings and provide the URL and access information for your private git repository
- If using SSH to authenticate with your local repo, there is a known issue when initially setting this up. See #2922545: Adding to known_hosts on initial install
Auto-deployment to EZProxy
On your EZProxy server, you can configure your operating system's cron to check for updates.
Caution try these steps on a test server before configuring in your production environment
Clone your repository and setup a git hook to restart EZProxy when a change is pulled down from the remote repository
git clone git@example.com:/ezproxy/your-config-repo config
cd config
echo '#!/bin/sh
/usr/local/ezproxy/ezproxy restart' > .git/hooks/post-merge
chmod +x .git/hooks/post-merge
Move your repository to your EZProxy directory
mv * .git /usr/local/ezproxy/
Configure cron to check for EZProxy updates every minute. Add this entry to cron via `crontab -e` as a user on your server who has read access to your git repository:
# Check for updates to EZProxy config.txt every five minutes
*/5 * * * * cd /usr/local/ezproxy && git pull origin master > /dev/null 2>&1
Maintenance
However often your Drupal cron is configured, your system will check if OCLC has made any updates to its stanzas. Any updates will be imported into your Drupal system. The respective stanza's node will be updated (and a revision made). If the stanza is in your config.txt all EZProxy administrators will be sent an email alert.