In this sample dirs_user_alarms.cfg file, we handle a common housekeeping task: clear browser caches so as to save disk space.
The EmptyNetscapeCacheNotice script just operates silently (although every file removal command is logged in the Notice.log file).
EmptyNetscapeCacheNotice makes reference to the =dirsuser_obj macro, which resolves to the name of the DirsUser.obj file. The script follows.
///////////////////////////////////////////////////////////////////////////////
//
// dirs_user_alarms.cfg
//
///////////////////////////////////////////////////////////////////////////////
[other alarms omitted...]
///////////////////////////////////////////////////////////////////////////////
EmptyNetscapeCacheNotice
init
status active
level notice
task "Automatically clear browser caches"
input proc "=apls =dirsuser_obj 2>/dev/null"
dat $dir $
rule
if $dir !~ "lost\\+found|tmp|pikt"
&& -e "$dir/.netscape/cache"
=execwait "=find $dir/.netscape/cache -type f -mtime +2
-exec =rm {} \\;"
endif
///////////////////////////////////////////////////////////////////////////////
[other alarms omitted...]
///////////////////////////////////////////////////////////////////////////////
This is just one program example. You could add rules, or write new scripts, for example to: report and fix incorrect home directory ownerships and permissions, fix home directory files, report orphaned user directories, report if home directories and files disappear, etc.
[For more examples, see Samples.]
Home |
FAQ |
News |
Intro |
Samples |
Tutorial |
Reference |
Software |
Authors |
Licensing |
SiteSearch
Links |
SiteIndex |
Pikt-Users |
Pikt-Workers |
Contribute |
ContactUs |
Top of Page
Page best viewed at 1024x768.
Page last updated 2005-06-22.
This site is
PIKT®
powered.
PIKT® is a registered trademark of the University of Chicago.
Copyright © 1998-2005 Robert Osterlund. All rights reserved.
|