I'm using openvpn and free-radius for control user accounts. for maximum session time for an user, free-radius has sqlcounter.conf that control that, but after a connection has disconnected that is useful and cannot destroy a connection. for control account time dynamically i need another script that do that. but should anytime that a connection has established a trigger run. is anyway to fire a custom trigger or script when a connection has established? or any way to control session time dynamically?
after couple of search i cannot find a way to do that, but a way to know when a connection is established is use radius log files and radius database. mysql have not a notify in change method but for log files can use file system notify patches for example dnotify "in the past" and inotify library. i start using that and post that result.
i do that, with a c program that look for a program change, you can check a user connection to openvpn.
but this is not so good code, but its working, can anybody write this code better?