On Thu, 8 Nov 2001, Nathan Miller wrote:

> I did just this on 2 different systems.  It worked on the second system, so 
> as your and in Chris's email suggest I removed all files, and reinstalled 
> fresh and new.  I am no longer receiving segfaults. =)  Thanks guys.
> 
> On to the next issue.  I am trying to execute external scripts on both 
> Start and Stop status types.  The Start works; however, the Stop seems to 
> be skipped entirely.
> 
> My users file looks like this for the start and stop:

Ummm you do mean acct_users don't you ???
 
> DEFAULT         Acct-Status-Type := Start
>                  Exec-Program-Wait = "/etc/raddb/test.sh START",
>                  Fall-Through = 1
> 
> DEFAULT         Acct-Status-Type := Stop
>                  Exec-Program-Wait = "/etc/raddb/test.sh STOP",
>                  Fall-Through = 1

Why not, just run the same script:
-----
#!/bin/bash

function mail_error () {
        mail -s "$1" you@yours </dev/null >/dev/null 2>&1
}

if [ -z "$ACCT_STATUS_TYPE" ] ; then 
        mail_error "No \$ACCT_STATUS_TYPE"
        exit
fi

if [ "$ACCT_STATUS_TYPE" == "Stop" ] ; then 
        /usr/local/accountsing/acct-down.sh
else if [ "$ACCT_STATUS_TYPE" == "Sart" ] ; then
        /usr/local/accountsing/acct-up.sh
else
        mail_error 'malformed accouning packet not Start/Stop'
fi
-----

Then your entry becomes very simple maybe ???
DEFAULT         Exec-Program = "/etc/raddb/test.sh"


Yours Tony.

/*
 * "The significant problems we face cannot be solved at the 
 * same level of thinking we were at when we created them."
 * --Albert Einstein
 */


- 
List info/subscribe/unsubscribe? See http://www.freeradius.org/list/users.html

Reply via email to