#!/bin/bash #written by mel support@designpow.com #================================================ echo "Check status? (Y/n)" read -e runcfg0 #================================================ if [ "$runcfg0" == y ] ; then sudo invoke-rc.d airtime-liquidsoap status sudo invoke-rc.d airtime-playout status sudo invoke-rc.d airtime-media-monitor status sudo invoke-rc.d apache2 status sudo invoke-rc.d rabbitmq-server status #================================================ echo "Quit Now? Choone N to rerun (Y/n)" read -e runquit if [ "$runquit" == y ] ; then exit 1 fi #================================================ fi #================================================ echo "Change files? (Y/n)" read -e runcfg #================================================ #================================================ echo "Restart All Services (Playout ,Media-monitor and Apache? (Y/n)" read -e runcfg2 #================================================ if [ "$runcfg" == y ] ; then sudo nano /etc/airtime/api_client.cfg sudo nano /etc/airtime/airtime.conf sudo nano /etc/icecast2/icecast.xml sudo nano /etc/apache2/sites-available/airtime-vhost.conf fi echo "" echo "===== Reloading Apache Then Checking Config =====" echo "" echo "" if [ "$runcfg2" == y ] ; then echo "===== Restart Liquidsoap =====" sudo airtime-update-db-settings sudo service airtime-playout restart echo "" echo "===== Restart Media Monitor =====" echo "" sudo service airtime-media-monitor restart fi echo "" echo "===== Restart Apache2 =====" echo "" sudo service apache2 restart echo "" echo "===== Checking Config =====" echo "" echo "Wait 10-15 Seconds then Press any key to recheck status " read -e runcfg4 sudo airtime-check-system #================================================ echo "Rerun the script? (Y/n)" read -e runcfg3 #================================================ if [ "$runcfg3" == y ] ; then sudo bash air-reconfig fi