Icecast test

by scrane
2 deployments · 0 still active · last rev. 3 months ago

Testing Icecast

Compatible with: CentOS 6.8
						#!/bin/bash
# <UDF name="db_password" Label="MySQL root Password" />
# <UDF name="db_name" Label="Database Name" default="" example="Create this database" />
# <UDF name="db_user" Label="MySQL Username" default="" example="Create this user" />
# <UDF name="db_user_password" Label="MySQL Username Password" default="" example="User's password" />
# <UDF name="icecast_license_key" Label="License Key" default="" example="Centova License Key" >
source <ssinclude StackScriptID=1>
yum update -y
yum install wget -y
yum install mysql-server -y
service mysqld start
/sbin/chkconfig --levels 235 mysqld on

mysql -e "UPDATE mysql.user SET Password = PASSWORD('$DB_PASSWORD') WHERE User = 'root'" 
mysql -e "CREATE USER '$DB_USER'@'localhost' IDENTIFIED BY '$DB_USER_PASSWORD'"
mysql -e "CREATE DATABASE $DB_NAME"
mysql -e "GRANT ALL PRIVILEGES ON $DB_NAME.* TO '$DB_USER'@'localhost'"
mysql -e "DROP DATABASE test"
mysql -e "FLUSH PRIVILEGES"

wget http://rd.centova.com/files/camomile-0.8.5.tar.gz
wget -O install.sh install.centova.com/$ICECAST_LICENSE_KEY
chmod a+x ./install.sh
echo y | chmod a+x ./install.sh
echo y |./install.sh --icecast-all
wget http://rd.centova.com/files/camomile-0.8.5.tar.gz
echo y | mv camomile-0.8.5.tar.gz /usr/local/src/liquidsoap/dlcompleted/camomile.tar.gz
echo "END STACKSCRIPT"