Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/sh
# updatejoomlas
# updates your Joomla 2.5.x websites to the latest version (2.5.13 in this example)
#
# Copyright 2013 Rene Kreijveld - email@renekreijveld.nl
#
# This program is free software; you may redistribute it and/or modify it.
wget http://joomlacode.org/gf/download/frsrelease/18554/83288/Joomla_2.5.x_to_2.5.13-Stable-Patch_Package.zip -O /joomla/25xupdate.zip
src=/joomla/25xupdate.zip
do_update()
{
# if configuration.php present then proceed
if [ -f configuration.php ]
then
# extract update files
unzip -q -o $src
# set rights
owner=`pwd | cut -d \/ -f 3`
chown -R $owner:$owner .htaccess *
fi
}
echo `date` Start automatic Joomla updates
# www.yoursite.nl
cd /home/yoursite/domains/www.yoursite.nl/public_html
do_update
echo `date` www.yoursite.nl updated
# next website
echo `date` End automatic Joomla updates
@renekreijveld

This comment has been minimized.

Copy link
Owner Author

@renekreijveld renekreijveld commented Jul 26, 2013

To do:

  • test for existance of configuration.php (done) and check if current version is 2.5.x.
  • determine current Joomla version
  • choose correct zipfile based on current Joomla version
  • add parameter to create a backup before upgrade
  • how to handle database updates (if any)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment