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