2
0

setup-domain 544 B

12345678910111213141516
  1. #!/bin/bash
  2. set -o errexit
  3. [ -z "$1" ] && echo "Please specify a domain name (ex. magento.test)" && exit
  4. DOMAIN=$1
  5. echo "Your system password has been requested to add an entry to /etc/hosts..."
  6. echo "127.0.0.1 ::1 $DOMAIN" | sudo tee -a /etc/hosts
  7. echo "Set https://${DOMAIN}/ to web/secure/base_url and web/secure/base_url"
  8. bin/clinotty bin/magento config:set web/secure/base_url https://"$DOMAIN"/
  9. bin/clinotty bin/magento config:set web/unsecure/base_url https://"$DOMAIN"/
  10. echo "Generating SSL certificate..."
  11. bin/setup-ssl "$DOMAIN"