Reply To: Accounting on Zeroshell

Home Page Forums Network Management ZeroShell Accounting on Zeroshell Reply To: Accounting on Zeroshell



Dear friends,

I´ve been working towards control the time spend by an user in a connection and also to give end user some time feedback.

It is a little difficult to explain easily how I have accomplished this ( I expect to explain soon ), but in short words:

The Authenticator window sends periodically a https request. In Zeroshell, a script is launched every each time and update the access time of a predefined file.

There´s a script that runs continuously and check every 1 – 5 minutes whether the access time of that file was updated;if not,calls a script that ends the connection.

So, what I have done is:

1. Modify the Add User page in order to add the Connection Time field and, when submitted, calls a shell script of my own, and then calls the original kerbynet cgi script.

2. My script creates a cron job ( first I had to install the cron and crontab binaries in zeroshell ) that will launch another script when the connection should time out.

3. This script will create a flag file

4. Then I modified the authenticator page, so each time is called, checks for this flag file; if it exists, close the connection.

Besides this, I have modified other scripts and created some new for tracking connections for accounting.
I have also modified the authenticator script in order to give the end user time feedback.

This is a very brief description of what I have done up to date, meanwhile Fulvio give us a more ideal solution to our requeriments.

Thanks again Fulvio for this great code!