#!/bin/bash
# This file is part of the webmin-ldap-user-simple package

LOGOUTTIME=$(grep logouttime /etc/webmin/miniserv.conf | sed -e 's/^.*=//')

# find the stale statefiles

find /tmp -name '*.wlus.state'  \
	-gid 0 -uid 0 -perm 600 \
	-amin +$LOGOUTTIME -type f -maxdepth 1 \
	-print0 | \
	xargs --null rm -f 
