From b6227eb00d7d21877aae88a4a5f8c8e8467a2f46 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 26 Aug 2014 01:53:34 -0400 Subject: [PATCH] bash is easy when you know bash also, lining up columns is super important --- launcher | 9 ++------- templates/web.template.yml | 2 +- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/launcher b/launcher index 8f72682..bc358fc 100755 --- a/launcher +++ b/launcher @@ -245,7 +245,7 @@ if compare_version "1.2.0" "$docker_version"; then echo "We recommend you upgrade docker, the version you are running has no restart policies, on reboot your container may not start up" restart_policy="" else - restart_policy="--restart=always " + restart_policy="--restart=always" fi @@ -286,12 +286,7 @@ run_start(){ exit 1 fi - 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 \ + $docker_path run $restart_policy "${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 diff --git a/templates/web.template.yml b/templates/web.template.yml index d82fd18..eeae3bc 100644 --- a/templates/web.template.yml +++ b/templates/web.template.yml @@ -68,7 +68,7 @@ run: - mkdir -p tmp/sockets - touch tmp/.gitkeep - mkdir -p /shared/log/rails - - bash -c "touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log" + - bash -c "touch -a /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log" - bash -c "ln -s /shared/log/rails/{production,production_errors,unicorn.stdout,unicorn.stderr}.log $home/log" - bash -c "mkdir -p /shared/{uploads,backups}" - bash -c "ln -s /shared/{uploads,backups} $home/public" -- 2.25.1