| |
---|
| | # |
---|
| | # Copyright (c) 2006 TundraWare Inc., Des Plaines, IL USA |
---|
| | # All Rights Reserved |
---|
| | |
---|
| | RCSID='$Id: rebuild-hosts.allow.sh,v 1.106 2008/10/20 20:25:24 tundra Exp $' |
---|
| | RCSID='$Id: rebuild-hosts.allow.sh,v 1.107 2012/01/13 22:39:31 tundra Exp $' |
---|
| | |
---|
| | # How long should access remain open? |
---|
| | # This must be in the format used by the 'find -ctime' option |
---|
| | |
---|
| | DURATION=10m |
---|
| | |
---|
| | # File locations |
---|
| | |
---|
| | BASE="/usr/local/etc/tperimeter" |
---|
| | EPILOGUE=${BASE}/epilogue |
---|
| | PROLOGUE=${BASE}/prologue |
---|
| |
---|
| | ##### |
---|
| | # Rebuild /etc/hosts-allow |
---|
| | ##### |
---|
| | |
---|
| | # Before we do this, delete the user requests older than $DURATAION |
---|
| | |
---|
| | find ${USERREQUESTS} -type f -ctime +${DURATION} -exec rm {} \; |
---|
| | |
---|
| | # Timestamp it |
---|
| | |
---|
| | echo "# Built By: ${RCSID}" |
---|
| | echo "# Built On: `date`" |
---|
| |
---|
| | # Now, the standard prologue |
---|
| | |
---|
| | cat ${PROLOGUE} |
---|
| | |
---|
| | |
---|
| | # Delete the user requests |
---|
| | |
---|
| | rm -rf ${USERREQUESTS} |
---|
| | |
---|
| | |
---|
| | # Now include the standard set of access definitions |
---|
| | |
---|
| | echo "" |
---|
| | echo "# Standard 'Deny' Entries" |
---|
| |
---|
| | |