From a26f1a70e325f89cc1181bdd86d4f53eacaff802 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Fri, 4 Dec 2015 15:56:06 -0500 Subject: [PATCH] Respawn liquidsoap and pypo indefinitely if they fail to launch. Throttled it though. --- .../pypo/install/upstart/airtime-liquidsoap.conf.template | 4 ++++ .../pypo/install/upstart/airtime-playout.conf.template | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/python_apps/pypo/install/upstart/airtime-liquidsoap.conf.template b/python_apps/pypo/install/upstart/airtime-liquidsoap.conf.template index 7a975e632..f7b6fa696 100644 --- a/python_apps/pypo/install/upstart/airtime-liquidsoap.conf.template +++ b/python_apps/pypo/install/upstart/airtime-liquidsoap.conf.template @@ -5,6 +5,10 @@ start on runlevel [2345] stop on runlevel [!2345] respawn +# Respawn it indefinitely +respawn limit unlimited +# Wait 3 seconds before spawning it again though, to throttle CPU. +post-stop exec sleep 3 setuid WEB_USER setgid WEB_USER diff --git a/python_apps/pypo/install/upstart/airtime-playout.conf.template b/python_apps/pypo/install/upstart/airtime-playout.conf.template index fe2d3c8dc..8d94eba5a 100644 --- a/python_apps/pypo/install/upstart/airtime-playout.conf.template +++ b/python_apps/pypo/install/upstart/airtime-playout.conf.template @@ -5,6 +5,10 @@ start on runlevel [2345] stop on runlevel [!2345] respawn +# Respawn it indefinitely +respawn limit unlimited +# Wait 3 seconds before spawning it again though, to throttle CPU. +post-stop exec sleep 3 setuid WEB_USER setgid WEB_USER @@ -12,4 +16,4 @@ setgid WEB_USER env LANG='en_US.UTF-8' env LC_ALL='en_US.UTF-8' -exec airtime-playout \ No newline at end of file +exec airtime-playout