- API Reference
- System Accounts
- Advanced Configurations
- Command-line Tools
- Event Scripts
- Files and Paths
Reinstalling Centova Cast
During testing, it may be useful to perform frequent, automated reinstallations of Centova Cast to provide a "clean" environment for further tests.
The following script is an example of how this process can be completely automated and run in an unattended manner. Note that it requires an initial, functioning installation of Centova Cast in order to operate.
##!/usr/bin/env bash ## pull in database configuration values . /usr/local/centovacast/etc/centovacast.conf ## uninstall echo 'UNINSTALL' | /usr/local/centovacast/sbin/uninstall --i-want-to-delete-all-my-data ## clear the database echo "DROP DATABASE $DB_NAME; CREATE DATABASE $DB_NAME;" \ | mysql -h$DB_HOST -u$DB_NAME -p$DB_PASS ## clean up any remaining data from the old installation (but just in case) rm -rf /usr/local/centovacast /etc/centovacast.conf ## automate the reinstallation; tweak the parameters to your tastes ./install.sh --icecast-all --channel=stable --email@example.com \ --admin-pass=example --dbname=$DB_NAME --dbuser=$DB_USER --dbpass=$DB_PASS \ --dbhost=$DB_HOST
After saving this to your server as
reinstall.sh and making it executable using
chmod a+x reinstall.sh,
simply place it in the same directory as your original
install.sh file (from your initial Centova Cast
installation) and invoke it as needed to perform a fully automated reinstallation.