You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 19, 2021. It is now read-only.
@driespieters I'm switching to ZSH and having this same issue. I don't know ZSH script, but messed around a bit and it looks as though the comments in Shopify's sample ssl-check script were what was causing the issue. The following code — stripped of comments — is working for me.
function ssl-check() {
f=~/.localhost_ssl;
ssl_crt=$f/server.crt
ssl_key=$f/server.key
b=$(tput bold)
c=$(tput sgr0)
local_ip=$(ipconfig getifaddr $(route get default | grep interface | awk '{print $2}'))
domains=(
"localhost"
"$local_ip"
)
if [[ ! -f $ssl_crt ]]; then
echo -e "\n🛑 ${b}Couldn't find a Slate SSL certificate:${c}"
make_key=true
elif [[ ! $(openssl x509 -noout -text -in $ssl_crt | grep $local_ip) ]]; then
echo -e "\n🛑 ${b}Your IP Address has changed:${c}"
make_key=true
else
echo -e "\n✅ ${b}Your IP address is still the same.${c}"
fi
if [[ $make_key == true ]]; then
echo -e "Generating a new Slate SSL certificate...\n"
count=$(( ${#domains[@]} - 1))
mkcert ${domains[@]}
test ! -d $f && mkdir $f
if [[ $count = 0 ]]; then
mv ./localhost.pem $ssl_crt
mv ./localhost-key.pem $ssl_key
else
mv ./localhost+$count.pem $ssl_crt
mv ./localhost+$count-key.pem $ssl_key
fi
fi
}
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The Bash function to create a self signed SSL certificate won't work after switching to ZSH. (Default now on OSX)
https://github.com/Shopify/slate/wiki/4.-Create-a-self-signed-SSL-certificate
Does anyone know how to modify the script to run in ZSH?
Temporary fix: revert the console shell to Bash.
chsh -s /bin/bash
(Also restart terminal)
The text was updated successfully, but these errors were encountered: