[TYPO3-english] Automatic extension update (TYPO3 4.5)

d.ros projects at r-system.de
Wed Jul 10 16:36:51 CEST 2013


Am 10.07.2013 15:41, schrieb Sybille Peters:
> Hello,
>
> I would like to update an extension in a number of TYPO3 installations
> (same TYPO3 version) via shellscript.
>
> There is no change in the database schema.
>
> Some tests show that unpacking and moving all files is the best way to
> go, e.g.
>
> cd /var/tmp/;tar xzf myext.tar.gz
> cd /var/www/typo3/typo3conf/ext;mv myext myext.bak;mv /var/tmp/myext .;
> chown -R www-data:www-data myext
>
> However some caching issues still exist:
> - if there is a change in text in locallang.xml, the change is not
> applied, it seems one needs to delete files in typo3temp/llxml
> - if there are changes in TypoScript, these changes are also not
> applied, one needs to delete configuration cache in the backend. Is it
> possible to do this via shellscript?
> - other issues?
>
> I realize it is usually recommended to do this via Extension Manager but
> this is an extremely tedious and repetitive task if one needs to update
> in a number of TYPO3 installations. Surely, there must be a way to
> automate this.
>
> Any help is really appreciated!
>
> TYPO 3.5.27, pibase and extbase Extensions
>
> Regards,
>
> Sybille
>
>
>
>

Here some snippets that should lead you.


##truncate some tables via shellscript:

pageCacheTables=(
cache_extensions
cache_hash
cache_imagesizes
cache_md5params
cache_pages
cache_pagesection
cache_typo3temp_log
cache_treelist
cachingframework_cache_hash
cachingframework_cache_hash_tags
cachingframework_cache_pages
cachingframework_cache_pages_tags
cachingframework_cache_pagesection
cachingframework_cache_pagesection_tags
)
	
pageCacheTablesLength=${#pageCacheTables[*]}

j=0
while [ $j -lt $pageCacheTablesLength ];
do
mysql --batch -u${username} -p"${password}" -h${host} ${database} -e 
"TRUNCATE ${pageCacheTables[$j]}"
mysql --batch -u${username} -p"${password}" -h${host} ${database} -e 
"ALTER TABLE ${pageCacheTables[$j]} auto_increment=1"
echo Tabelle ${pageCacheTables[$j]} geleert
let j++
done

##remove some cachefiles from typo3conf via shellscript:

cd ${LOCALDIR}/typo3conf
rm -fv temp_CACHED_*

##remove typo3temp

rm -Rf ${LOCALDIR}/typo3temp/*

##make a new cache per domain from external file

mkdir ${LOCALDIR}/typo3temp/web_cache/
cd ${LOCALDIR}/typo3temp/web_cache/

##Domains Cachen
for i in `cat ${LOCALDIR}/domains2cache.txt`; do
echo "--> Start caching $i!"
wget -r -q -nc -t 3 --waitretry=10 -k --level=3 --no-cache 
--referer="http://yours.de" http://$i;
echo "-> Domain $i cached !"
echo " "
done
echoStatus "All Domains cached!"
}

....

Have fun with the snippets.

cheers

David



More information about the TYPO3-english mailing list