From ac3903416e7dc70f985a35a036ab484700c700a7 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 26 Aug 2014 08:46:40 +1000 Subject: [PATCH] bash is hard --- launcher | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/launcher b/launcher index 0cd5ea5..8f72682 100755 --- a/launcher +++ b/launcher @@ -286,7 +286,12 @@ run_start(){ exit 1 fi - $docker_path run "$restart_policy""${env[@]}" -h "`hostname`-$config" -e DOCKER_HOST_IP=$docker_ip --name $config -t --cidfile $cidfile $ports \ + run="run" + if [ -n "${restart_policy}" ]; then + run="$run $restart_policy" + fi + + $docker_path $run "${env[@]}" -h "`hostname`-$config" -e DOCKER_HOST_IP=$docker_ip --name $config -t --cidfile $cidfile $ports \ -d $volumes $local_discourse/$config /sbin/runit exit 0 -- 2.25.1