Author: bdube Date: Tue Oct 27 20:52:48 2015 New Revision: 1710885 URL: http://svn.apache.org/viewvc?rev=1710885&view=rev Log: Updates for new virtual machine
Modified: forrest/zone/config/crontab.txt forrest/zone/config/run-forrestbot.sh forrest/zone/config/setenv-java-16.sh forrest/zone/config/setenv.sh forrest/zone/config/update-forrest-trunk.sh forrest/zone/config/update_check.sh Modified: forrest/zone/config/crontab.txt URL: http://svn.apache.org/viewvc/forrest/zone/config/crontab.txt?rev=1710885&r1=1710884&r2=1710885&view=diff ============================================================================== --- forrest/zone/config/crontab.txt (original) +++ forrest/zone/config/crontab.txt Tue Oct 27 20:52:48 2015 @@ -1,16 +1,17 @@ -# Crontab of the Forrest role account user: 'forrest' +# Crontab of the Forrest role account user: 'forrest_role' # Do an svn update check every hour at 45 minutes past. -45 * * * * /home/forrest/config/update_check.sh +45 * * * * /home/forrest_role/config/update_check.sh # Run forrestbot jobs every hour. -04 * * * * /home/forrest/config/run-forrestbot.sh forrest-seed.xml notify trunk -07 * * * * /home/forrest/config/run-forrestbot.sh forrest-sample-2.xml notify trunk -10 * * * * /home/forrest/config/run-forrestbot.sh forrest-docs.xml notify trunk +04 * * * * /home/forrest_role/config/run-forrestbot.sh forrest-seed.xml notify trunk +07 * * * * /home/forrest_role/config/run-forrestbot.sh forrest-sample-2.xml notify trunk +10 * * * * /home/forrest_role/config/run-forrestbot.sh forrest-docs.xml notify trunk # cleanup old logs -58 23 * * * find /home/forrest/config/forrestbot-*/logs -name '*.log' -o -name '*.tar.gz' -mtime +1 | xargs rm -f -58 23 * * * cd /home/forrest/config; find . \( -type d ! -name . -prune \) -o \( -name "update-forrest-trunk-*.log" -mtime +1 -print \) | xargs rm -f +58 23 * * * find /home/forrest_role/config/forrestbot-*/logs -name '*.log' -mtime +1 | xargs rm -f +57 23 * * * find /home/forrest_role/config/forrestbot-*/logs -name '*.tar.gz' -mtime +1 | xargs rm -f +58 23 * * * cd /home/forrest_role/config; find . \( -type d ! -name . -prune \) -o \( -name "update-forrest-trunk-*.log" -mtime +1 -print \) | xargs rm -f # -- EVERYTHING BELOW THIS LINE HAS BEEN DISABLED, NEED TO CHECK WHEN/IF THESE ENTRIES CAN BE REMOVED -- Modified: forrest/zone/config/run-forrestbot.sh URL: http://svn.apache.org/viewvc/forrest/zone/config/run-forrestbot.sh?rev=1710885&r1=1710884&r2=1710885&view=diff ============================================================================== --- forrest/zone/config/run-forrestbot.sh (original) +++ forrest/zone/config/run-forrestbot.sh Tue Oct 27 20:52:48 2015 @@ -23,7 +23,7 @@ # - Run the relevant version of forrestbot. # See also cron which calls this script. -# The crontab is for the "forrest" user. +# The crontab is for the "forrest_role" user. # See copy in SVN at zone/config/crontab.txt fbVersion=$3 @@ -51,11 +51,11 @@ END ;; esac -export CONFIG=/home/forrest/config +export CONFIG=/home/forrest_role/config source ${CONFIG}/setenv.sh source ${CONFIG}/setenv-java-16.sh -export FORREST_HOME=/home/forrest/sources/forrest-$fbVersion +export FORREST_HOME=/home/forrest_role/sources/forrest-$fbVersion export FORRESTBOT_HOME=${CONFIG}/forrestbot-$fbVersion export PATH=${PATH}:${FORREST_HOME}/bin umask 0002 Modified: forrest/zone/config/setenv-java-16.sh URL: http://svn.apache.org/viewvc/forrest/zone/config/setenv-java-16.sh?rev=1710885&r1=1710884&r2=1710885&view=diff ============================================================================== --- forrest/zone/config/setenv-java-16.sh (original) +++ forrest/zone/config/setenv-java-16.sh Tue Oct 27 20:52:48 2015 @@ -19,6 +19,7 @@ # Java 1.6 #export JAVA_HOME=/usr/local/diablo-jdk1.6.0 #export JAVA_HOME=/usr/local/jdk1.6.0 -export JAVA_HOME=/usr/local/openjdk6 +#export JAVA_HOME=/usr/local/openjdk6 +export JAVA_HOME=/usr/lib/jvm/java-6-openjdk-amd64 export PATH=${JAVA_HOME}/bin:${PATH} Modified: forrest/zone/config/setenv.sh URL: http://svn.apache.org/viewvc/forrest/zone/config/setenv.sh?rev=1710885&r1=1710884&r2=1710885&view=diff ============================================================================== --- forrest/zone/config/setenv.sh (original) +++ forrest/zone/config/setenv.sh Tue Oct 27 20:52:48 2015 @@ -17,7 +17,7 @@ export SHELL=/bin/bash -export DOC_ROOT=/usr/local/www/apache22/data -export CONFIG=/home/forrest/config +export DOC_ROOT=/home/forrest_role/htdocs +export CONFIG=/home/forrest_role/config export LANG=en_US.UTF-8 export PATH=${PATH}:/usr/local/bin Modified: forrest/zone/config/update-forrest-trunk.sh URL: http://svn.apache.org/viewvc/forrest/zone/config/update-forrest-trunk.sh?rev=1710885&r1=1710884&r2=1710885&view=diff ============================================================================== --- forrest/zone/config/update-forrest-trunk.sh (original) +++ forrest/zone/config/update-forrest-trunk.sh Tue Oct 27 20:52:48 2015 @@ -18,10 +18,10 @@ # FIXME: Need better error handling if SVN fails or if build fails. -source /home/forrest/config/setenv.sh -source /home/forrest/config/setenv-java-16.sh +source /home/forrest_role/config/setenv.sh +source /home/forrest_role/config/setenv-java-16.sh umask 0002 -export FORREST_HOME=/home/forrest/sources/forrest-trunk +export FORREST_HOME=/home/forrest_role/sources/forrest-trunk logfn=`date "+update-forrest-trunk-%Y%m%d%H.log"` logfile=${CONFIG}/$logfn @@ -31,7 +31,7 @@ export REPLYTO=${sender} function sendMsg { mail -s "forrest.zones.a.o : ${1}" $recipient <<EOF -At forrest.zones.apache.org +At forrest-vm.apache.org $1 $2 @@ -44,8 +44,8 @@ uptime >> $logfile echo >> $logfile echo "Do svn update ..." >> $logfile -cd /home/forrest/sources/forrest-trunk -/usr/local/bin/svn update >> $logfile 2>&1 +cd /home/forrest_role/sources/forrest-trunk +svn update >> $logfile 2>&1 statusUpdate=$? echo "statusUpdate=$statusUpdate" >> $logfile if [ "$statusUpdate" != "0" ]; then Modified: forrest/zone/config/update_check.sh URL: http://svn.apache.org/viewvc/forrest/zone/config/update_check.sh?rev=1710885&r1=1710884&r2=1710885&view=diff ============================================================================== --- forrest/zone/config/update_check.sh (original) +++ forrest/zone/config/update_check.sh Tue Oct 27 20:52:48 2015 @@ -1,6 +1,7 @@ #!/bin/bash -/usr/local/bin/svn st -u /home/forrest/sources/forrest-trunk | grep '\*' > /dev/null +svn status --show-updates /home/forrest_role/sources/forrest-trunk | grep --quiet --no-messages '\*' + if [ ${?} -eq 0 ]; then - /home/forrest/config/update-forrest-trunk.sh + /home/forrest_role/config/update-forrest-trunk.sh fi