Run build from installer; add upstart files and templating back in

This commit is contained in:
Duncan Sommerville 2015-06-30 12:16:31 -04:00
parent 7f9b54b006
commit b4599317e9
2 changed files with 21 additions and 10 deletions

29
install
View File

@ -312,6 +312,9 @@ else
checkCommandExists "psql"
fi
# Run composer (install PHP dependencies) and create a VERSION file
loudCmd "./build.sh"
if [ -f /etc/airtime/airtime.conf ]; then
OLD_CONF=$(grep "[media-monitor]" /etc/airtime/airtime.conf)
@ -472,19 +475,27 @@ verbose "\n * Installing airtime_analyzer..."
loudCmd "python ${AIRTIMEROOT}/python_apps/airtime_analyzer/setup.py install --install-scripts=/usr/bin"
verbose "...Done"
#for i in /etc/init/airtime*.template; do
# chmod 644 $i
# sed -i "s/WEB_USER/${web_user}/g" $i
# mv $i ${i%.template}
#done
for i in /etc/init/airtime*.template; do
chmod 644 $i
sed -i "s/WEB_USER/${web_user}/g" $i
mv $i ${i%.template}
done
set +e
loudCmd "initctl reload-configuration"
loudCmd "systemctl daemon-reload" #systemd hipsters
loudCmd "update-rc.d airtime-playout defaults" # Start at bootup, on Debian
# airtime-celery only has an init.d startup script
loudCmd "update-rc.d airtime-celery defaults" # Start at bootup, on Debian
loudCmd "update-rc.d airtime-liquidsoap defaults" # Start at bootup, on Debian
loudCmd "update-rc.d airtime_analyzer defaults" # Start at bootup, on Debian
# On Ubuntu, we already have the upstart configs, so this is redundant
# and causes multiple processes to spawn on startup
if [ "$dist" != "ubuntu" ]; then
loudCmd "systemctl daemon-reload" #systemd hipsters
loudCmd "update-rc.d airtime-playout defaults" # Start at bootup, on Debian
loudCmd "update-rc.d airtime-liquidsoap defaults" # Start at bootup, on Debian
loudCmd "update-rc.d airtime_analyzer defaults" # Start at bootup, on Debian
fi
set -e
if [ ! -d /var/log/airtime ]; then

View File

@ -22,7 +22,7 @@ else:
mm2_files.append(os.path.join(root, filename))
data_files = [
# ('/etc/init', ['install/upstart/airtime-media-monitor.conf.template']),
('/etc/init', ['install/upstart/airtime-media-monitor.conf.template']),
('/etc/init.d', ['install/sysvinit/airtime-media-monitor']),
('/etc/airtime', ['install/media_monitor_logging.cfg']),
('/var/log/airtime/media-monitor', []),