Getting value from shell scripts

Fajar A. Nugraha list at fajar.net
Thu Oct 22 10:45:06 CEST 2015


On Thu, Oct 22, 2015 at 3:34 PM, Randeep <randeep123 at gmail.com> wrote:

> Hi,
>
> I have wrote a shell script and defined in exec module.
>
>

> Script is as follows:
> [root at freeradius ~]# cat /scripts/get_streaming_data_usage.sh
> #/bin/bash
>
> #get the framed IP_address:
> framed_ip_address = $1
> #Get the usage in bytes:
> data_usage = `grep "$framed_ip_address" /scripts/user-bandwidth.txt | cut
> -d , -f 4`
>
> How can I get the value of data_usage inside the file
> /usr/local/etc/raddb/sites-enabled/default
>
>

Have you read the documentation? It should be included within your
installation.

The online verison for 3.0.9:
http://networkradius.com/doc/3.0.9/raddb/mods-available/exec.html
https://github.com/FreeRADIUS/freeradius-server/blob/v3.0.x/scripts/exec-program-wait

Short version:
- do NOT commment out output_pairs
- See "echo"s at the end of the example

-- 
Fajar


More information about the Freeradius-Users mailing list