#!/bin/sh
#
# chpass.cgi - # This small front-end script initializes the environment
# with site-specific configuration information, and then invokes the
# "chpass" processor. This is placed on the web server (either the
# cgi-bin directory or the document tree), and all the other assets
# reside off in the "web-chpass" lib directory.
#
# Part of the "web-chpass" package.
# https://github.com/chip-rosenthal/web-chpass
#
# Chip Rosenthal
# <chip@unicom.com>
#

#
# CHPASS_LIBDIR - Pathname to the "web-chpass" library.
#
CHPASS_LIBDIR='/usr/local/lib/web-chpass'
export CHPASS_LIBDIR

#
# CHPASS_TEMPLATE - Name of the HTML template to use.  Resides in
# $CHPASS_LIBDIR.
#
CHPASS_TEMPLATE='chpass.tmpl'
export CHPASS_TEMPLATE

#
# Go exec the chpass processor - should not return.
#
exec $CHPASS_LIBDIR/chpass-cgi.pl

#
# Oops!
#
cat <<__EOT__
Content-Type: text/plain

SYSTEM ERROR:  Cannot run $CHPASS_LIBDIR/chpass-cgi.pl
Please notify system administrator of this problem.
__EOT__

exit 0

