Sha256: 040687a4e4e092e2acb6bcb686b20ac59b8eda03bc7703df2817947c09450a8a

Contents?: true

Size: 349 Bytes

Versions: 17

Compression:

Stored size: 349 Bytes

Contents

#!/bin/bash -eux
function schedule_termination() {
  chmod +x /etc/rc.d/rc.local
  echo "/opt/aws-ec2/auto_terminate.sh after_ami >> /var/log/auto-terminate.log 2>&1" >> /etc/rc.d/rc.local
}

function unschedule_termination() {
  grep -v auto_terminate.sh /etc/rc.d/rc.local > /etc/rc.d/rc.local.tmp
  mv /etc/rc.d/rc.local.tmp /etc/rc.d/rc.local
}

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
aws-ec2-1.4.9 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.8 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.7 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.6 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.5 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.4 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.3 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.2 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.1 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.4.0 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.3.2 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.3.1 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.3.0 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.2.2 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.2.1 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.2.0 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh
aws-ec2-1.1.0 lib/aws_ec2/scripts/auto_terminate/functions/amazonlinux2.sh