]> andersk Git - moira.git/blobdiff - gen/postoffice.sh
use a seperate zephyr class for colo hosts
[moira.git] / gen / postoffice.sh
index b63448d63b6f7d69fed115c242cb1bd377949be1..eb8bc2ea0b67372bcfd996e8fa9bdd4ae8fe7b54 100644 (file)
@@ -6,6 +6,12 @@
 PATH=/sbin:/bin:/usr/sbin:/usr/bin:/etc:/usr/etc:/usr/athena/bin:/usr/local/bin
 export PATH
 
+if [ -d /var/athena ] && [ -w /var/athena ]; then
+    exec >/var/athena/moira_update.log 2>&1
+else
+    exec >/tmp/moira_update.log 2>&1
+fi
+
 # The following exit codes are defined and MUST BE CONSISTENT with the
 # error codes the library uses:
 MR_NOCRED=47836470
@@ -39,7 +45,7 @@ mkdir ${SRC_DIR}
 chmod 700 ${SRC_DIR}
 
 uchost=`hostname | tr '[a-z]' '[A-Z]'`
-echo $uchost | egrep -e "." > /dev/null
+echo $uchost | egrep -e "\." > /dev/null
 if [ $? != 0 ]; then
        domain=`grep domain /etc/resolv.conf | awk '{print $2}' |tr '[a-z]' '[A-Z]'`
 
@@ -99,7 +105,8 @@ cp ${IMAP_CONFIG}/mailboxes ${IMAP_CONFIG}/mailboxes.save
 #
 LD_LIBRARY_PATH=/usr/local/tcl/lib
 export LD_LIBRARY_PATH
-${IMAP_BIN}/cyradm -file /usr/local/bin/sync.cyradm sync -d
+
+${IMAP_BIN}/cyradm -file ${IMAP_BIN}/sync.cyradm sync -d
 if [ $? != 0 ]; then
        exit ${MR_MKCRED}
 fi
This page took 0.061362 seconds and 4 git commands to generate.