exec-program-wait   [plain text]


#!/bin/sh
#
# $Id: exec-program-wait,v 1.3 2002/01/09 16:06:50 aland Exp $
#
#  Sample script to run when a 'user' file entry is similar to:
#
#bob	Password == "bob"
#	Exec-Program-Wait = "/path/to/program/exec-program-wait"
#
#  For 'acct_users':
#
#DEFAULT Acct-Status-Type == Start
#	Exec-Program = "/path/to/exec/acct/start"
#
#DEFAULT Acct-Status-Type == Stop
#	Exec-Program = "/path/to/exec/acct/stop"
#
#
#  Each of the attributes in the request will be available in an
#  environment variable.  The name of the variable depends on the
#  name of the attribute.  All letters are converted to upper case,
#  and all hyphens '-' to underlines.
#
#  For example, the User-Name attribute will be in the $USER_NAME
#  environment variable.  If you want to see the list of all of
#  the variables, try adding a line 'printenv > /tmp/exec-program-wait'
#  to the script.  Then look in the file for a complete list of
#  variables.
#
echo "Reply-Message += \"Hello, %u\","
echo "Reply-Message += \"PATH=$PATH\","
echo Framed-IP-Address = 255.255.255.255
exit 0