Sha256: 0d5c5f1624e7eb805a9ca28499c721a9448496e7b61e36849de692ca97524baa

Contents?: true

Size: 343 Bytes

Versions: 17

Compression:

Stored size: 343 Bytes

Contents

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

function unschedule_termination() {
  grep -v terminate-myself /etc/rc.local > /etc/rc.local.tmp
  mv /etc/rc.local{.tmp,}
}

Version data entries

17 entries across 17 versions & 1 rubygems

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