New reindexing script...
Mike Schwartz
mschw at athenet.net
Sat Jan 30 16:08:22 PST 2016
I just finished revising my reindex script for Linux/Unix systems. In
addition to using "dxmaint -ra", as Ken Brody suggested, I put in a test to
make sure I only looped through directories and that the script wouldn't
hang if it found a file like 'nohup.out" in the /u/appl/filepro subdir.
----- ----- -----
echo "Started `date`" >/home/mjs/retime
cd /u/appl/filepro
for file in *
do echo $file
if [[ -d $file ]]; then
echo "Starting Freechain:" $file `date` >>/home/mjs/retime
/u/appl/fp/lib/freechain $file
echo $file `date` >>/home/mjs/retime
/u/appl/fp/dxmaint $file -ra -e
fi
done
echo "Ended `date`" >>/home/mjs/retime
----- ----- -----
This script still has one bug: It locked up when it hit the
"/u/appl/filepro/stmenu", which is where the old Softa/Fourgen menus are
kept.
I got around the stmenu issue by defining a filepro file named
"stmenu". That put a map, key and data in the stmenu subdirectory so that
dxmaint treats that subdir as a filepro database without any indexes and
skips over it. Unfortunately, if anybody creates a subdirectory in
/u/appl/filepro for any other purpose, the script will probably fail. Maybe
I should test for the presence of a "map" file inside each subdirectory
before I launch dxmaint or freechain...
Do any of you see any other pitfalls in this script?
I need this script to run autonomously as a "cron" job every weekend at
some of my customer sites, so I don't want to leave too many loose ends...
I suppose I should test for symlinked files, but I don't expect that
there would be any in the filepro subdir and I think this script would
reindex symlinked files properly.
Thanks!
Mike Schwartz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.celestial.com/pipermail/filepro-list/attachments/20160130/2d8c0895/attachment.html>
More information about the Filepro-list
mailing list