From: Chris Koeritz Date: Thu, 2 Jul 2020 00:47:13 +0000 (-0400) Subject: better noise at runtime X-Git-Tag: 2.140.124^2~3 X-Git-Url: https://feistymeow.org/gitweb/?a=commitdiff_plain;h=6f6781c879a853e5435e20e897ae4e60b4a01fc7;p=feisty_meow.git better noise at runtime --- diff --git a/scripts/system/moodle_updater.sh b/scripts/system/moodle_updater.sh index 676b8a1e..3faa6e72 100644 --- a/scripts/system/moodle_updater.sh +++ b/scripts/system/moodle_updater.sh @@ -14,6 +14,7 @@ moodle_release=moodle-3.9 # the name of the release we're expecting to download and install download_url="https://download.moodle.org/download.php/direct/stable39/${moodle_release}.tgz" # where we can get the latest version of moodle for our chosen releases. + # this URL could change over time, but it's the best link i could find for now. #### # everything below should be version invariant. @@ -28,25 +29,27 @@ fi # where we unpack our temporary stuff. temp_install="$(mktemp -d /tmp/update_moodle.XXXXXX)" -#echo temp install dir is: $temp_install +echo "Using temporary directory for installation: $temp_install" if [ ! -d "$temp_install" ]; then echo The temporary installation directory at: $temp_install could not be created. exit 1 fi # quit the running moodle instance. +echo "Stopping Apache httpd before moodle update." systemctl stop httpd exit_on_error stopping httpd process before moodle upgrade. # jump into our new work area. pushd "$temp_install" -# get the latest moodle version. this could change over time, -# but it's the best link i could find. +# get the latest moodle version. +echo "Downloading latest version of '$moodle_release' now." wget "$download_url" exit_on_error downloading latest version of moodle. # use the feisty meow unpack script to extract the moodle data. +echo "Installing the latest $moodle_release now." unpack "${moodle_release}.tgz" exit_on_error unpacking latest version of moodle. @@ -56,13 +59,14 @@ mv "$moodle_parent/$moodle_dir" "$old_moodle_path" exit_on_error renaming old version of moodle. # move the new stuff into place. -mv "${moodle_release}/$moodle_dir" "$moodle_parent"/ +mv "arch_${moodle_release}/${moodle_dir}" "$moodle_parent"/ &>/dev/null exit_on_error moving new version of moodle into place. # grab our important configuration files and put them back in the new directory. cp "$old_moodle_path/config.php" "$moodle_path" exit_on_error copying existing moodle configuration file: config.php +# legalesey warnings about what we didn't do... echo -e "\ ==== NOTE: This script does not copy any plugins or themes. If you are using\n\ @@ -74,8 +78,13 @@ into the new install at:\n\ " # restart the running moodle instance. -systemctl stop httpd +echo "Starting Apache httpd after moodle update." +systemctl start httpd exit_on_error starting httpd process after moodle upgrade. +# back out of our directory and clean up the temporary junk, if any. +popd +rm -rf "$temp_install" + # sunshine and roses! we are through the gauntlet.