[isf-wifidog] Splash only & enforcing timeouts (reprise)

Han Boetes hboetes at utelisys.com
Mar 20 Avr 09:41:53 EDT 2010


On 04/19/2010 01:38 PM, Han Boetes wrote:
>  I'd rather avoid running unstable branches. I think I'll try to
>  implement something which regularly checks in postgres the mac addresses
>  which belong to splash_only_user and then remove them once they get
>  older than an hour.
>
>  If anyone with more postgres experience than me knows how to do that
>  properly please let me know. It seems you can easily do this in a
>  shell-script of a few lines, if you know the right postgres commands
>  that is.

Pfff easy:

psql wifidog -A -q -c "DELETE FROM public.connections, public.users 
WHERE (username='SPLASH_ONLY_USER' AND timestamp_in < current_timestamp 
- interval '1 hour') ORDER BY timestamp_in"


>  I already was doing that and accidentally removed the admin user. How
>  can I recreate that user without killing the current settings?

Run the installer again, it won't harm existing settings.


Met vriendelijke groet,


Han Boetes
--
Utelisys Communications B.V.



Plus d'informations sur la liste de diffusion WiFiDog