|
Ключ
Эта строка удалена.
Это слово было удалено. Это слово было добавлено.
Эта строка добавлена.
|
Изменения (16)
просмотр истории страницы| h2. Настройка EVENT_INC.SH |
| {code} #wall 'event_inc.sh' |
... |
| # \ # && LOG INFO " reconect user "$ip $id \ |
| # || LOG INFO " NOT changed user "$ip $id |
| unlock_telnet } |
... |
| : LOG INFO "$gcount Disable Internet for id=$id ip=$ip enabled=$enabled over_limit=$over_limit deleted=$deleted tray_logged=$tray_logged" |
| echo "Acct-Session-Id=\"$acct_session_id\",Forward-Policy=\"in:\", / |
| echo "Acct-Session-Id=\"$acct_session_id\",Forward-Policy=\"in:\",Forward-Policy=\"in:HTTP-REDIRECT\",HTTP-Redirect-URL=\"http://10.50.0.100/noauth\""| Forward-Policy=\"in:HTTP-REDIRECT\",HTTP-Redirect-URL=\"http://10.50.0.100/noauth\""| radclient -x $nas_ip:$coa_port coa $nas_pass \ |
| | grep -i "Session-Context-Not-Found" [ $? -eq 0 ] && do_session=1 |
... |
| case "$EVENT" in login | tray_view_login | balance_negative | balance_positive) |
| if [ "$nas_ip" = '172.1.1.11' '192.168.1.11' ]; then |
| if [ "$acct_session_id" != "" ]; then do_policy ## and set var do_session |
... |
| # возможно надо убрать user_data_changed try_double_login|try_double_acc) |
| if [ "$nas_ip" = '172.1.1.11' '192.168.1.11' ]; then |
| # sqlexec "update users_radiusauth set logged=0, radius_logged=0, RADIUS_CHECKED=0, |
| # RADIUS_BREAK=0 where user_id=$id;" sleep 5 |
| # sqlexec "update users_radiusauth set logged=0, radius_logged=0, RADIUS_CHECKED=0, |
| # RADIUS_BREAK=0 where user_id=$id;" #do_reconnect |
... |
| exit 0 fi |
| if [ "$nas_ip" = '172.1.1.11' '192.168.1.11' ]; then |
| echo "gcount=$gcount" > /tmp/tray_view_mustlogon.$id setsid bash -c "sleep 100; rm -f /tmp/tray_view_mustlogon.$id " & |
... |
| #do_reconnect do_snmp |
| #do_policy |
| fi ;; user_data_changed) |
| if [ "$nas_ip" = '172.1.1.11' '192.168.1.11' ]; then |
| sleep 10 do_reconnect |
... |
| user_disconnect) |
| if [ "$nas_ip" = '172.1.1.11' '192.168.1.11' ]; then |
| sleep 10 #do_reconnect |
... |
| ;; "rate_set") |
| [ "$nas_ip" = '172.1.1.11' '192.168.1.11' ] && \ |
| if [ $ceil_in -ne -1 ] then |
... |
| let "burst_out = ceil_out * 1000 / 8" let "excess_burst_out = ceil_out * 1500 / 8" |
| echo "Acct-Session-Id=\"$acct_session_id\",Dynamic-QoS-Param += \"police-class-rate cls-all rate-absolute $ceil_in\",Dynamic-QoS-Param += \"police-class-burst cls-all $burst_in\",Dynamic-QoS-Param += \"police-class-excess-burst cls-all $excess_burst_in\",Dynamic-QoS-Param += \"meter-class-rate cls-all rate-absolute $ceil_out\",Dynamic-QoS-Param += \"meter-class-burst cls-all $burst_out\",Dynamic-QoS-Param += \"meter-class-excess-burst cls-all $excess_burst_out\""| radclient -x $nas_ip:$coa_port coa $nas_pass && LOG INFO " the user set ceil_in=$ceil_in and ceil_out=$ceil_out " $ip id=$id |
| echo "Acct-Session-Id=\"$acct_session_id\",Dynamic-QoS-Param += \"police-class-rate cls-all rate-absolute $ceil_in\", / Dynamic-QoS-Param += \"police-class-burst cls-all $burst_in\", / Dynamic-QoS-Param += \"police-class-excess-burst cls-all $excess_burst_in\",Dynamic-QoS-Param += \"meter-class-rate cls-all rate-absolute $ceil_out\", / Dynamic-QoS-Param += \"meter-class-burst cls-all $burst_out\", / Dynamic-QoS-Param += \"meter-class-excess-burst cls-all $excess_burst_out\""| radclient -x $nas_ip:$coa_port coa $nas_pass && LOG INFO " / the user set ceil_in=$ceil_in and ceil_out=$ceil_out " $ip id=$id |
| else LOG INFO " NOT changed ceil_in=$ceil_in and ceil_out=$ceil_out " $ip $id |
... |
| ;; esac |
| |
| {code} |