Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Commit

Permalink
Always creates log directory so drain script will not fail
Browse files Browse the repository at this point in the history
[#130936381]

Signed-off-by: Angela Chin <[email protected]>
  • Loading branch information
Kevin Kelani authored and angelachin committed Sep 23, 2016
1 parent 3001bdd commit ed280a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions jobs/consul_agent/templates/drain
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
#!/bin/bash -exu
#!/bin/bash -xu

LOG_DIR=/var/vcap/sys/log/consul_agent
JOB_DIR=/var/vcap/jobs/consul_agent

exec 3>&1

mkdir -p "${LOG_DIR}"

exec 1>> ${LOG_DIR}/drain.log
exec 2>> ${LOG_DIR}/drain.log

set +e
${JOB_DIR}/bin/agent_ctl stop
set -e

echo 0 >&3
exit 0

0 comments on commit ed280a9

Please sign in to comment.