Reinstalling Centova Cast

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
    | 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
./ --icecast-all --channel=stable \
    --admin-pass=example --dbname=$DB_NAME --dbuser=$DB_USER --dbpass=$DB_PASS \

After saving this to your server as and making it executable using chmod a+x, simply place it in the same directory as your original file (from your initial Centova Cast installation) and invoke it as needed to perform a fully automated reinstallation.