To automate our environment we wrote this bash script. It may won't work in your environment, but maybe you get some ideas for your own script.
- Clone this repository.
- Make the script executable (if not cloned):
chmod +x moodle-update
The script creates a settings.conf
file for a standard Debian/Ubuntu Linux.
But don't worry: If something is not working, the tests will fail before any changes would be performed. Adapt the settings.conf
to your needs and re-run the script.
- Without any parameter:
./update-moodle
- With new version:
./update-moodle 3.9
- With new version + explicit download file:
./update-moodle 3.9 https://example.com/moodle-3.9.21.zip
For some reason the latest zip file name scheme has changed:
4.1
is called401
(instead of41
)4.2
is called402
(instead of42
)- (future versions may be affected too)
You need to enter 4.01
or 4.02
as version number to use the script for these versions!
-
Within a minor release (3.9.19 -> 3.9.21) you should be fine to use the
copy all
option. -
If you're updating from one minor release to another (3.9 -> 3.11) or upgrading from one major release to another (3.11 -> 4.0) some plugins should not be copied over. Please use a test server to figure out which of your installed plugins cause problems.