Skip to content

Instantly share code, notes, and snippets.

@renekreijveld
Last active December 20, 2015 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save renekreijveld/6089197 to your computer and use it in GitHub Desktop.
Save renekreijveld/6089197 to your computer and use it in GitHub Desktop.
#!/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
Copy link
Author

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