Update Utility
Centova Cast includes a fully automated update utility to upgrade Centova Cast when a full update or new components are available.
Basic Invocation
The basic invocation for the update utility is:
/usr/local/centovacast/sbin/update
Updating Individual Components
If for some reason you only want to update some particular component of Centova Cast instead of performing a complete upgrade, you can pass an application identifier as the first parameter to the update script. For example:
/usr/local/centovacast/sbin/update web
The above would update the Centova Cast web server only. If you need a list of all available, upgradeable application identifiers on your server, you can use this command:
for f in /usr/local/centovacast/etc/update.d/*.update; do
. $f; echo "${DATADIR/cc-/} - $TITLE"
done
Forcing an Update
Centova Cast automatically detects whether a newer version of each package is available, and will not attempt to update the package if a newer version is not available.
If you wish to force an update (for example, if you suspect the files from the package have been corrupted on your server), you may pass the --force
parameter to force the installation, eg:
/usr/local/centovacast/sbin/update --force
This can also be used with individual components as explained in the previous section.
Performing Custom Actions on Update
You may wish to have Centova Cast run a custom script before or after an update, for example to preserve and restore modifications you've made to the Centova Cast theme.
Before performing an update, Centova Cast checks for the existence of a preupdate
shell script in:
/usr/local/centovacast/sbin/preupdate
If it exists and is executable, Centova Cast will invoke it prior to performing the update.
Similarly, after performing an update, Centova Cast checks for the existence of a postupdate
shell script in:
/usr/local/centovacast/sbin/postupdate
If it exists and is executable, Centova Cast will invoke it after the update.
Both preupdate
and postupdate
are standard shell scripts; they should begin with a shebang line (eg: #!/bin/bash
or similar) and may be written in any language for which an interpreter is installed on your server.
The following simple example would preserve any modifications you've made to your Centova Cast logo on the login page:
preupdate:
#!/bin/sh
mkdir -p /usr/local/centovacast/var/preupdate_backup
cp -f /usr/local/centovacast/web/theme/images/login-logo.png \
/usr/local/centovacast/var/preupdate_backup/
postupdate:
#!/bin/sh
cp -f /usr/local/centovacast/var/preupdate_backup/login-logo.png \
/usr/local/centovacast/web/theme/images/
rm -rf /usr/local/centovacast/var/preupdate_backup