Sha256: eb75dc16b3bc0cd520a6aad0065ad8c7144e05411f2e1d1482d87666adaa5a13
Contents?: true
Size: 594 Bytes
Versions: 44
Compression:
Stored size: 594 Bytes
Contents
#!/bin/bash while [ 1 ] do string=`curl http://169.254.169.254/latest/meta-data/spot/termination-time` if [[ $string == *"Not Found"* ]] then # no problem message="MESSAGE=Heartbeat,INSTANCE=`curl http://169.254.169.254/latest/meta-data/instance-id`" #aws sns publish --topic-arn "{{ sns_arn }}" --region {{ region }} --message $message else message="MESSAGE=Terminate,INSTANCE=`curl http://169.254.169.254/latest/meta-data/instance-id`" aws sns publish --topic-arn "{{ sns_arn }}" --region {{ region }} --message $message break fi sleep 2 done while [ 1 ] do sleep 10 done
Version data entries
44 entries across 44 versions & 1 rubygems