]> code.citadel.org Git - citadel.git/blobdiff - citadel/database_cleanup.sh
This is an omnibus commit which moves the Citadel Server from crusty old GNU Autotool...
[citadel.git] / citadel / database_cleanup.sh
index c355274972971cfa914a6d89149bd27c6f8889a5..765494679f86088130f29260bd0e65210d847710 100755 (executable)
@@ -38,20 +38,20 @@ done
 
 DATA_DIR=$DATA_DIR/data
 
-# If we're on an AppDir system, use the embedded db_tools.
-if [ "${APPDIR}" != "" ] ; then
-       export PATH=${APPDIR}/usr/bin:$PATH
-       RECOVER=${APPDIR}/usr/bin/db_recover
-       DUMP=${APPDIR}/usr/bin/db_dump
-       LOAD=${APPDIR}/usr/bin/db_load
-
-# If we're on an Easy Install system, use our own db_ tools.
-elif [ -x /usr/local/ctdlsupport/bin/db_dump ] ; then
+# If we're on a Docker or Easy Install system, use our own db_ tools.
+if [ -x /usr/local/ctdlsupport/bin/db_dump ] ; then
        export PATH=/usr/local/ctdlsupport/bin:$PATH
        RECOVER=/usr/local/ctdlsupport/bin/db_recover
        DUMP=/usr/local/ctdlsupport/bin/db_dump
        LOAD=/usr/local/ctdlsupport/bin/db_load
 
+# otherwise look in /usr/local
+elif [ -x /usr/local/bin/db_dump ] ; then
+       export PATH=/usr/local/bin:$PATH
+       RECOVER=/usr/local/bin/db_recover
+       DUMP=/usr/local/bin/db_dump
+       LOAD=/usr/local/bin/db_load
+
 # usual install
 else
        if test -f /usr/bin/db_dump; then 
@@ -107,10 +107,8 @@ WARNING #3:
   tool only if that one fails to fix your problem.
 
 WARNING #4:
-  You must have an amount of free space on your disk that is at least twice
-  the size of your database, see the following output:
-  (for substantially better performance you should specify a location that is 
-   on another disk than $DATA_DIR)
+  You must have an amount of free space in /tmp that is at least twice
+  the size of your database. see the following output:
 
 `df -h`
 
@@ -140,11 +138,11 @@ do
                echo error $?
                die
        }
-       rm -f $DATA_DIR/$filename
+       rm -vf $DATA_DIR/$filename
 done
 
 echo Removing old databases
-rm -f ./data/*
+rm -vf $DATA_DIR/*
 
 for x in 00 01 02 03 04 05 06 07 08 09 0a 0b 0c 0d
 do