MediaWiki update script “mediawiki-updater”

Because repetative tasks bore me (my principle is: “If you have to do something twice, automate it. Every time you have to do it again increases the likeliness of doing it again.”), I have written a two scripts to automate the task “update MediaWiki”.

As I manage installations on both Linux and Windows I created a Bash and a PowerShell script.

The files (and their requirements) can be found in the following repo:

https://github.com/gpunktschmitz/mediawiki-updater

Here are the steps the scripts do:
1. check if a new release is available
2. backup the MySQL database
3. backup (copy) the current installation
4. download new MediaWiki release
5. extract new MediaWiki release into a temporary directory
6. overwrite current installation (files) with the new release
7. delete the directory “vendor”
8. clone the external libraries into the directory “vendor” using git
9. delete old backups (but keep the last 3)
10. run the script “maintenance/update.php”

While creating these I thought of running them by cron/scheduled task. They are not yet perfect for that – but I was able to successfully update my installations from version 1.28.2 to 1.29.0 by manually running them.

Hope it helps you automate that task also.

script for updating ip address on dyndns with ddclient if public ip changed

long time ago (very long) i set up a script which wrote the current date into a file and checked every hour whether the current date is different to that from the file .. and if so update dyndns …

pretty stupid .. right!

so i set up a new .. more reasonable one …

this one checks the current public ip address with the one set on dyndns ip (thanks!) ..

if it differs the dyndns ip is updated with the current public ip address …

you can find it (dyndnsCheckUpdate.sh)  on github within my bash_scripts repository …

i now added this script as cron job to run every 15 minutes …