Browser Cache Clear
In this sample dirs_user_alarms.cfg file, we handle a common housekeeping task: clear web browser caches so as to save disk space.
The EmptyNetscapeCache script just operates silently (although every file removal command is logged in the alert's log file).
EmptyNetscapeCache makes reference to the =dirsuser_obj macro, which resolves to the name of the DirsUser.obj file. The script follows.
EmptyNetscapeCache init status =piktstatus level =piktlevel 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
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.