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

Commit

Permalink
Fix awk flag issue by switching to using sed
Browse files Browse the repository at this point in the history
[#130747035]

Signed-off-by: Evan Farrar <[email protected]>
  • Loading branch information
angelachin authored and evanfarrar committed Sep 27, 2016
1 parent 05a8a09 commit 8622131
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jobs/consul_agent/templates/agent_ctl.sh.erb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ LOG_DIR=/var/vcap/sys/log/consul_agent
JOB_DIR=/var/vcap/jobs/consul_agent
CONFAB_PACKAGE=/var/vcap/packages/confab

exec > >(tee -a >(logger -p user.info -t vcap.${SCRIPT_NAME}.stdout) | awk -W interactive '{lineWithDate="echo [`date +\"%Y-%m-%d %H:%M:%S%z\"`] \"" $0 "\""; system(lineWithDate) }' >> $LOG_DIR/${SCRIPT_NAME}.log)
exec 2> >(tee -a >(logger -p user.error -t vcap.${SCRIPT_NAME}.stderr) | awk -W interactive '{lineWithDate="echo [`date +\"%Y-%m-%d %H:%M:%S%z\"`] \"" $0 "\""; system(lineWithDate) }' >> $LOG_DIR/${SCRIPT_NAME}.err.log)
exec > >(tee -a >(logger -p user.info -t vcap.${SCRIPT_NAME}.stdout) | sed -e "s/^/[`date +\"%Y-%m-%d %H:%M:%S%z\"`] /" >> $LOG_DIR/${SCRIPT_NAME}.log)
exec 2> >(tee -a >(logger -p user.error -t vcap.${SCRIPT_NAME}.stderr) | sed -e "s/^/[`date +\"%Y-%m-%d %H:%M:%S%z\"`] /" >> $LOG_DIR/${SCRIPT_NAME}.err.log)

function start_confab() {
local nameservers
Expand Down

0 comments on commit 8622131

Please sign in to comment.