-- crythias 7/20/12]
After overwriting you should also run the set permissions script and clean the cash.
If you want to run the latest cvs version for your test, you can also use the following bash script.
The config of the scripts fits allready for Ubuntu. You only need to edit your home dir.
When exiting the script, it fetches the newest version of OTRS from CVS, includes the current otrs config, sets the permissisions, rebuilds the otrs config, cleans the cache and finally reloads the webserver.
Before exiting you need to run the following command:
Code: Select all
cvs -d :pserver:anonymous@cvs.otrs.org:/home/cvs login
Code: Select all
#!/bin/bash
#config
OTRS_TMP_DIR="/home/yourname"
OTRS_DIR="/opt"
OTRS_NAME="otrs"
OTRS_USER="otrs"
OTRS_GROUP="otrs"
WEBSERVER_USER="www-data"
WEBSERVER_GROUP="www-data"
ERROR_COUNT="0"
# functions
function actionstart (){
echo -e "\n`date '+%d.%m.%G %H:%M:%S'` - ${1}"
}
function exitcode (){
if [ "$?" = 0 ];then
echo "`date '+%d.%m.%G %H:%M:%S'` - ${1} - ok "
else
echo "`date '+%d.%m.%G %H:%M:%S'` - ${1} - not ok "
let ERROR_COUNT=ERROR_COUNT+1
fi
}
#script
actionstart "open otrs tmp dir"
cd ${OTRS_TMP_DIR}
exitcode "open otrs tmp dir"
actionstart "delete odl otrs tmp dir if exists"
test -d ${OTRS_TMP_DIR}/${OTRS_NAME}/ && rm -r ${OTRS_TMP_DIR}/${OTRS_NAME}/
exitcode "delete odl otrs tmp dir if exists"
actionstart "checkout otrs head from cvs"
cvs -z3 -d :pserver:anonymous@cvs.otrs.org:/home/cvs co otrs
exitcode "checkout otrs head from cvs"
actionstart "copy old Config.pm to new cvs version tmp dir"
cp ${OTRS_DIR}/${OTRS_NAME}/Kernel/Config.pm ${OTRS_TMP_DIR}/${OTRS_NAME}/Kernel/
exitcode "copy old Config.pm to new cvs version tmp dir"
actionstart "copy old ZZZAuto.pm to new cvs version tmp dir"
cp ${OTRS_DIR}/${OTRS_NAME}/Kernel/Config/Files/ZZZAuto.pm ${OTRS_TMP_DIR}/${OTRS_NAME}/Kernel/Config/Files/
exitcode "copy old ZZZAuto.pm to new cvs version tmp dir"
actionstart "copy old ZZZAAuto.pm to new cvs version tmp dir"
cp ${OTRS_DIR}/${OTRS_NAME}/Kernel/Config/Files/ZZZAAuto.pm ${OTRS_TMP_DIR}/${OTRS_NAME}/Kernel/Config/Files/
exitcode "copy old ZZZAAuto.pm to new cvs version tmp dir"
actionstart "remove old otrs dir"
rm -r ${OTRS_DIR}/${OTRS_NAME}
exitcode "remove old otrs dir"
actionstart "move new cvs version to otrs location"
mv ${OTRS_TMP_DIR}/${OTRS_NAME}/ ${OTRS_DIR}/
exitcode "move new cvs version to otrs location"
actionstart "set otrs permissions"
${OTRS_DIR}/${OTRS_NAME}/bin/otrs.SetPermissions.pl --otrs-user=${OTRS_USER} --otrs-group=${OTRS_GROUP} --web-user=${WEBSERVER_USER} --web-group=${WEBSERVER_GROUP} ${OTRS_DIR}/${OTRS_NAME}
exitcode "set otrs permissions"
actionstart "rebuild otrs config"
${OTRS_DIR}/${OTRS_NAME}/bin/otrs.RebuildConfig.pl
exitcode "rebuild otrs config"
actionstart "delete otrs cache"
${OTRS_DIR}/${OTRS_NAME}/bin/otrs.LoaderCache.pl -o delete
exitcode "delete otrs cache"
actionstart "reload webserver"
/etc/init.d/apache2 reload
exitcode "reload webserver"
echo -e "\nGet OTRS from CVS finished! Errors = ${ERROR_COUNT}\n