Skip to content

Commit 960be3a

Browse files
committed
Log the instance storage script output to the system log
1 parent fbb335f commit 960be3a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

packer/linux/conf/bin/bk-mount-instance-storage.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
#!/bin/bash
22
set -euxo pipefail
33

4+
# Write to system console and to our log file
5+
# See https://alestic.com/2010/12/ec2-user-data-output/
6+
exec > >(tee -a /var/log/elastic-stack.log|logger -t user-data -s 2>/dev/console) 2>&1
7+
48
# Mount instance storage if we can
59
# https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
610

0 commit comments

Comments
 (0)