Sha256: 065a1ed7abf9be23a6907286baf0390f126f39d0c56e8cec0a8475a8785f639e
Contents?: true
Size: 1.06 KB
Versions: 4
Compression:
Stored size: 1.06 KB
Contents
die(){ echo "error: $1" >&2 exit 1 } set -e export HOME=/root cd "$HOME" echo "configuring hostname from aws metadata service" host_title="${AWS_STACK_NAME}-$(echo "${AWS_INSTANCE_LOGICAL_NAME}" | sed 's/LaunchConfiguration$//')" private_hostname=$(curl -sL http://169.254.169.254/latest/meta-data/local-hostname) short_private_hostname=$(echo "${private_hostname}" | cut -d'.' -f 1) echo "${host_title}" > /etc/hostname hostname -b -F /etc/hostname sed -i '/127\.0\./d' /etc/hosts cat >>/etc/hosts <<EOF 127.0.0.1 localhost 127.0.1.1 ${private_hostname} ${host_title} ${short_private_hostname} EOF if [ -n "$PAPERTRAIL_HOST" ]; then curl -sL "https://papertrailapp.com/tools/papertrail-bundle.pem" > /etc/ssl/certs/papertrail.pem cat >>/etc/rsyslog.d/99-papertrail.conf <<EOF \$PreserveFQDN on \$DefaultNetstreamDriverCAFile /etc/ssl/certs/papertrail.pem \$ActionSendStreamDriver gtls \$ActionSendStreamDriverMode 1 \$ActionSendStreamDriverAuthMode x509/name \$ActionSendStreamDriverPermittedPeer *.papertrailapp.com *.* @@${PAPERTRAIL_HOST} EOF restart rsyslog fi
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
stacco-0.1.46 | ./priv/roles/Common.sh |
stacco-0.1.44 | ./priv/roles/Common.sh |
stacco-0.1.43 | ./priv/roles/Common.sh |
stacco-0.1.42 | ./priv/roles/Common.sh |