2 # This script performs updates of the web server.
5 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/etc:/usr/etc:/usr/athena/bin:/usr/local/bin
8 if [ -d /var/athena ] && [ -w /var/athena ]; then
9 exec >/var/athena/moira_update.log 2>&1
11 exec >/tmp/moira_update.log 2>&1
14 # The following exit codes are defined and MUST BE CONSISTENT with the
15 # error codes the library uses:
17 MR_MISSINGFILE=47836473
24 TARFILE=/usr/tmp/www.out
25 SRC_DIR=/usr/local/apache/etc
26 BIN_DIR=/usr/local/apache/bin
27 DEST_DIR=/usr/local/apache/etc
29 if [ ! -r $TARFILE ]; then
51 for file in `tar tf $TARFILE | awk '{print $1}' | sed 's;/$;;'` ; do
52 if [ $file != . ]; then
59 $BIN_DIR/dbmanage $file import $file.db
63 mv $DEST_DIR/$file $SRC_DIR/save/$file
64 mv $DEST_DIR/$file.db $SRC_DIR/save/$file.db
65 mv $SRC_DIR/build/$file $DEST_DIR/$file
66 mv $SRC_DIR/build/$file.db $DEST_DIR/$file.db