Created
November 7, 2019 06:37
-
-
Save torounit/519f4c094e00e3941def4c7b797edfdc to your computer and use it in GitHub Desktop.
amimoto で ec2-user する。
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
#!/usr/bin/env bash | |
set -e | |
echo '{ | |
"nginx" : { "config" : { "user" : "ec2-user" } }, | |
"php" : { "config" : { "user" : "ec2-user" } }, | |
"run_list" : [ "recipe[amimoto]" ] | |
}' > /opt/local/amimoto.json | |
/opt/local/provision | |
chown -R ec2-user:nginx /var/www/vhosts | |
echo '@reboot /bin/sh /opt/local/provision > /dev/null 2>&1; chown -R ec2-user /var/www/vhosts/' | crontab | |
sudo service php-fpm restart |
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
curl -L https://gist.githubusercontent.com/torounit/519f4c094e00e3941def4c7b797edfdc/raw/3cfb4d156eac331e0085c05985956e0f2ae7c8fa/run-httpd-as-ec2-user.sh | sudo bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment