From e0b6115cc2c7b59d5c43e7e8841e4d7e622ec074 Mon Sep 17 00:00:00 2001 From: Dave Pedu Date: Sun, 14 Dec 2014 20:27:03 -0800 Subject: [PATCH] Change some RDAirPlay settings by default, change some timing --- init.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/init.sh b/init.sh index 0c39977..7780fce 100755 --- a/init.sh +++ b/init.sh @@ -1,10 +1,10 @@ #!/bin/bash -sleep 5 +sleep 2 /etc/init.d/apache2 start -sleep 5 +sleep 2 # Wait for mysql to come online while [ "`ps aux | grep mysqld_safe | grep -v grep | wc -l`" -eq 0 ] ; do @@ -21,18 +21,22 @@ if [ $DBS -eq 0 ] ; then DISPLAY=:0 rdadmin --check-db --mysql-admin-user=root --mysql-admin-password=root --mysql-admin-hostname=127.0.0.1 --mysql-admin-dbname=Rivendell # Enable icecast plugin echo "INSERT INTO NOWNEXT_PLUGINS VALUES (1,'`hostname`',0,'/usr/lib/rivendell/rlm_icecast2.rlm','/etc/rd.icecast.conf');" | mysql -u root -proot Rivendell + # Set the startup mode for main log / aux1 / aux2 to load the previously used log + # TODO: Check if this row exists at this time. Need to wait for rdairplay to launch? + echo "UPDATE RDAIRPLAY SET LOG0_START_MODE=1, LOG1_START_MODE=1, LOG2_START_MODE=1 WHERE STATION='`hostname`';" | mysql -u root -proot Rivendell fi +# Update db if necessary rdadmin --check-db # Apache is trouble /etc/init.d/apache2 restart -sleep 5 +sleep 2 # Start gui apps -su -c "cd /home/rduser; DISPLAY=:0 rdairplay &" rduser +su -c "DISPLAY=:0 xterm -e rdairplay & " rduser su -c "DISPLAY=:0 jamin &" rduser sleep 10 @@ -45,4 +49,3 @@ su -c "jack_disconnect jamin:out_R system:playback_2" rduser su -c "jack_connect rivendell_0:playout_0R jamin:in_R" rduser su -c "jack_connect rivendell_0:playout_0L jamin:in_L" rduser -