Created
September 2, 2014 17:51
-
-
Save chriscoderdr/5d15d00a5a08960aec08 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
DOMAIN=$1 | |
mkdir "/var/websites/$1" | |
cp "/var/websites/dummy/index.html" "/var/websites/$1/index.html" | |
touch "/etc/nginx/sites-available/$1" | |
ln -s "/etc/nginx/sites-available/$1" "/etc/nginx/sites-enabled" | |
cp "/root/server-config.conf" "/etc/nginx/sites-available/$1" | |
sed -i "s/DOMAIN/$DOMAIN/g" "/etc/nginx/sites-available/$1" | |
service nginx reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment