Guest User

Untitled

a guest
Feb 5th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. #!/bin/bash
  2. domain="$1" && test -z ${domain} && return
  3. read -sp "DB user password:" dbuserp
  4.  
  5. mkdir ${drt}/${domain}/
  6. wp core download --path=${drt}/${domain}/ --allow-root
  7. wp config create --path=${drt}/${domain}/ --dbname=${domain} --dbuser=${domain} --dbpass=${dbuserp} --dbhost="localhost" --allow-root
  8.  
  9. sed "s/${domain}/${1}/g" ~/nginx_app > /etc/nginx/siteas-available/${domain}.conf
  10.  
  11. ln -sf /etc/nginx/sites-available/${domain}.conf /etc/nginx/sites-enabled/
  12. certbot --nginx -d ${domain} -d www.${domain}
  13.  
  14. echo "Please configure DBstack in phpmyadmin."
  15. echo "Please change permissions as you prefer and restart the Nginx server."
  16.  
  17. server {
  18. root ${drt}/${domain}/;
  19. server_name ${domain} www.${domain};
  20. location ~* .(jpg|jpeg|png|gif|ico|css|js|ttf|woff|pdf)$ { expires 365d; }
  21. }
Add Comment
Please, Sign In to add comment