Centova Shoutcast Centos 6.8

by agracie
18 deployments · 4 still active · last rev. 10 days ago

Centova Shoutcast + liquidsoap + MySQL on Centos6.8

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="shoutcast_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/$SHOUTCAST_LICENSE_KEY
chmod a+x ./install.sh
echo y |./install.sh --shoutcast-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
/usr/local/centovacast/sbin/update --add liquidsoap
echo "END STACKSCRIPT"