Skip to content

Instantly share code, notes, and snippets.

@moodysalem
Last active March 21, 2017 13:32
Show Gist options
  • Save moodysalem/4abfdf9b7210c4b1a721 to your computer and use it in GitHub Desktop.
Save moodysalem/4abfdf9b7210c4b1a721 to your computer and use it in GitHub Desktop.
ebextensions swapfile creation script ec2 swap
commands:
000_dd:
test: test ! -e /swapfile
command: dd if=/dev/zero of=/swapfile bs=1M count=2048 && chmod 600 /swapfile
001_mkswap:
command: mkswap /swapfile
ignoreErrors: true
002_swapon:
command: swapon /swapfile
ignoreErrors: true
@moodysalem
Copy link
Author

Changed it to just always try mkswap and swapon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment