Last active
March 21, 2017 13:32
-
-
Save moodysalem/4abfdf9b7210c4b1a721 to your computer and use it in GitHub Desktop.
ebextensions swapfile creation script ec2 swap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changed it to just always try mkswap and swapon