Code Review
/
yaml_builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
update logging to stdout and file
[yaml_builds.git]
/
tools
/
3deploy_site.sh
diff --git
a/tools/3deploy_site.sh
b/tools/3deploy_site.sh
index
5f30f0e
..
f1ef231
100755
(executable)
--- a/
tools/3deploy_site.sh
+++ b/
tools/3deploy_site.sh
@@
-16,7
+16,13
@@
##############################################################################
##############################################################################
-set -x
+set -xe
+LOGDIR="/var/log/yaml_builds"
+mkdir -p $LOGDIR
+LOGFILE="$LOGDIR/${1}_$(date +"%Y%m%d%H%M%z")_$(basename $0|cut -d. -f1)"
+echo "logging to $LOGFILE"
+exec 1> >(tee -a $LOGFILE)
+exec 2>&1
source $(dirname $0)/setenv.sh
source $(dirname $0)/setenv.sh
@@
-42,3
+48,8
@@
ssh $GENESIS_HOST << EOF
bash update_iptables.sh
bash deploy_site.sh
EOF
bash update_iptables.sh
bash deploy_site.sh
EOF
+
+exec 2>&-
+exec 1>&-
+exit 0
+