import from HEAD:
[freeradius.git] / scripts / exec-program-wait
1 #!/bin/sh
2 #
3 # $Id$
4 #
5 #  Sample script to run when a 'user' file entry is similar to:
6 #
7 #bob    Password == "bob"
8 #       Exec-Program-Wait = "/path/to/program/exec-program-wait"
9 #
10 #  For 'acct_users':
11 #
12 #DEFAULT Acct-Status-Type == Start
13 #       Exec-Program = "/path/to/exec/acct/start"
14 #
15 #DEFAULT Acct-Status-Type == Stop
16 #       Exec-Program = "/path/to/exec/acct/stop"
17 #
18 #
19 #  Each of the attributes in the request will be available in an
20 #  environment variable.  The name of the variable depends on the
21 #  name of the attribute.  All letters are converted to upper case,
22 #  and all hyphens '-' to underlines.
23 #
24 #  For example, the User-Name attribute will be in the $USER_NAME
25 #  environment variable.  If you want to see the list of all of
26 #  the variables, try adding a line 'printenv > /tmp/exec-program-wait'
27 #  to the script.  Then look in the file for a complete list of
28 #  variables.
29 #
30 echo "Reply-Message += \"Hello, %u\","
31 echo "Reply-Message += \"PATH=$PATH\","
32 echo Framed-IP-Address = 255.255.255.255
33 exit 0