Updated installer to better accommodate running over existing installs

This commit is contained in:
Duncan Sommerville 2015-01-14 16:11:49 -05:00
parent 8535c82b7f
commit df2576e5a0
4 changed files with 33 additions and 27 deletions

View File

@ -151,9 +151,9 @@ $result = $r1 && $r2;
} else {
?>">
Check that the airtime-media-monitor service is installed correctly in <code>/etc/init</code>,
and ensure that it's running in <br/><code>initctl list | grep airtime-media-monitor</code><br/>.
If not, try <br/><code>sudo service airtime-media-monitor start</code><br/>.
(Replace www-data with your web user if necessary)
and ensure that it's running with
<br/><code>initctl list | grep airtime-media-monitor</code><br/>
If not, try <br/><code>sudo service airtime-media-monitor start</code>
<?php
}
?>
@ -170,11 +170,10 @@ $result = $r1 && $r2;
<?php
} else {
?>">
Check that the airtime-playout service is installed correctly in <code>/etc/init</code>
and <code>/etc/init.d</code>, and ensure that it's running with
<br/><code>sudo initctl list | grep airtime-playout</code>. If not, try
<br/><code>sudo -u www-data service airtime-playout restart</code>.
(Replace www-data with your web user if necessary)
Check that the airtime-playout service is installed correctly in <code>/etc/init</code>,
and ensure that it's running with
<br/><code>sudo initctl list | grep airtime-playout</code><br/>
If not, try <br/><code>sudo service airtime-playout restart</code>
<?php
}
?>
@ -191,11 +190,10 @@ $result = $r1 && $r2;
<?php
} else {
?>">
Check that the airtime-liquidsoap service is installed correctly in <code>/etc/init</code>
and <code>/etc/init.d</code>, and ensure that it's running with
<br/><code>sudo initctl list | grep airtime-liquidsoap</code>. If not, try
<br/><code>sudo -u www-data service airtime-liquidsoap restart</code>.
(Replace www-data with your web user if necessary)
Check that the airtime-liquidsoap service is installed correctly in <code>/etc/init</code>,
and ensure that it's running with
<br/><code>sudo initctl list | grep airtime-liquidsoap</code><br/>
If not, try <br/><code>sudo service airtime-liquidsoap restart</code>
<?php
}
?>

24
install
View File

@ -236,6 +236,14 @@ echo "/ | \ || | \ | | | / Y \| \ "
echo "\____|__ /___||____|_ / |____| |___\____|__ /_______ / "
echo -e " \/ \/ \/ \/ \n"
if [ -f /etc/airtime/airtime.conf ]; then
# If we don't remove the existing python files in /usr/lib, services won't work properly
rm -rf /usr/lib/airtime/
echo -e "Existing Airtime installation detected. Your current /etc/airtime/airtime.conf\
will be moved to /etc/airtime/airtime.conf.bak"
mv /etc/airtime/airtime.conf /etc/airtime/airtime.conf.bak
fi
if [ "$apache" = "f" -a ${_i} -eq 1 ]; then
echo -e "Install default Airtime apache configuration? (Y/n): \c"
read IN
@ -342,15 +350,15 @@ chown -R ${web_user}:${web_user} /run/airtime
verbose "...Done"
verbose "\n * Copying logging files..."
cp -R ${AIRTIMEROOT}/python_apps/std_err_override /usr/lib/airtime/std_err_override
cp -R ${AIRTIMEROOT}/python_apps/std_err_override /usr/lib/airtime/
verbose "...Done"
verbose "\n * Copying API client files..."
cp -R ${AIRTIMEROOT}/python_apps/api_clients /usr/lib/airtime/api_clients
cp -R ${AIRTIMEROOT}/python_apps/api_clients /usr/lib/airtime/
verbose "...Done"
verbose "\n * Copying media-monitor files..."
cp -R ${AIRTIMEROOT}/python_apps/media-monitor/media-monitor /usr/lib/airtime/media-monitor
cp -R ${AIRTIMEROOT}/python_apps/media-monitor/media-monitor /usr/lib/airtime/
cp -R ${AIRTIMEROOT}/python_apps/media-monitor/media-monitor2 /usr/lib/airtime/media-monitor/mm2
verbose "...Done"
@ -396,6 +404,11 @@ if [ ! -d /var/log/airtime ]; then
mkdir -p /var/tmp/airtime/pypo/tmp/
mkdir -p /var/tmp/airtime/show-recorder/
verbose "\n * Copying logrotate files..."
cp ${AIRTIMEROOT}/airtime_mvc/build/airtime-php.logrotate /etc/logrotate.d/airtime-php
cp /usr/lib/airtime/pypo/bin/liquidsoap_scripts/airtime-liquidsoap.logrotate /etc/logrotate.d/airtime-liquidsoap
fi
verbose "\n * Setting permissions on /var/log/airtime..."
chmod -R a+x /var/log/airtime
chown -R ${web_user}:${web_user} /var/log/airtime/
@ -406,11 +419,6 @@ if [ ! -d /var/log/airtime ]; then
chown -R ${web_user}:${web_user} /var/tmp/airtime/
chown -R ${web_user}:${web_user} /usr/lib/airtime/
verbose "\n * Copying logrotate files..."
cp ${AIRTIMEROOT}/airtime_mvc/build/airtime-php.logrotate /etc/logrotate.d/airtime-php
cp /usr/lib/airtime/pypo/bin/liquidsoap_scripts/airtime-liquidsoap.logrotate /etc/logrotate.d/airtime-liquidsoap
fi
loud "\n-----------------------------------------------------"
loud " * Installing PHP * "
loud "-----------------------------------------------------"

0
installer/lib/requirements-debian-wheezy.apt Normal file → Executable file
View File

View File

@ -84,7 +84,7 @@ api_config['update_stream_setting_table'] = 'update-stream-setting-table/api_key
api_config['get_files_without_silan_value'] = 'get-files-without-silan-value/api_key/%%api_key%%'
api_config['update_cue_values_by_silan'] = 'update-cue-values-by-silan/api_key/%%api_key%%'
api_config['api_base'] = 'api'
api_config['bin_dir'] = '/usr/lib/airtime/api_clients'
api_config['bin_dir'] = '/usr/lib/airtime/api_clients/'