Commit 2ed342de by Ben Patterson

Make s3sync error message uniform.

parent ae60c94c
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# #
# This script can be called from logrotate # This script can be called from logrotate
# to sync logs to s3 # to sync logs to s3
# #
if (( $EUID != 0 )); then if (( $EUID != 0 )); then
echo "Please run as the root user" echo "Please run as the root user"
...@@ -99,7 +99,7 @@ onerror() { ...@@ -99,7 +99,7 @@ onerror() {
{"Subject": { "Data": "$message_string" }, "Body": { "Text": { "Data": "!! ERROR !! no logfile" } } } {"Subject": { "Data": "$message_string" }, "Body": { "Text": { "Data": "!! ERROR !! no logfile" } } }
EOF EOF
fi fi
echo "ERROR: syncing $s3_path on $instance_id" echo "Error syncing $s3_path on $instance_id"
{{ aws_cmd }} ses send-email --from {{ AWS_S3_LOGS_FROM_EMAIL }} --to {{ AWS_S3_LOGS_NOTIFY_EMAIL }} --message file://$message_file --region {{ aws_region }} {{ aws_cmd }} ses send-email --from {{ AWS_S3_LOGS_FROM_EMAIL }} --to {{ AWS_S3_LOGS_NOTIFY_EMAIL }} --message file://$message_file --region {{ aws_region }}
else else
echo "Error syncing $s3_path on $instance_id" echo "Error syncing $s3_path on $instance_id"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment