File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 70
70
fi
71
71
done
72
72
73
- # Lowercase the host to match the rest of our domains are looked up
73
+ # Lowercase the host to match how the rest of our domains are looked up
74
74
HOST=$( echo " $HOST " | tr ' [:upper:]' ' [:lower:]' )
75
75
TLD=$( " $PHP " " $DIR /cli/valet.php" tld)
76
- SECURED=$( grep --quiet --no-messages 443 ~ /.config/valet/Nginx/$HOST * )
76
+ $( grep --quiet --no-messages 443 ~ /.config/valet/Nginx/$HOST * )
77
+ SECURED=$?
77
78
78
79
if [[ $SHARETOOL = " ngrok" ]]
79
80
then
88
89
fi
89
90
90
91
# Decide the correct PORT: uses 60 for secure, else 80
91
- if $SECURED
92
- then
92
+ if [[ $SECURED -eq 0 ]]; then
93
93
PORT=60
94
94
else
95
95
PORT=80
104
104
105
105
# expose
106
106
# Decide the correct PORT: uses 443 for secure, else 80
107
- if $SECURED
108
- then
107
+ if [[ $SECURED -eq 0 ]]; then
109
108
PORT=443
110
109
else
111
110
PORT=80
118
117
elif [[ $SHARETOOL = " cloudflared" ]]
119
118
then
120
119
# cloudflared
121
- if $SECURED
122
- then
120
+ if [[ $SECURED -eq 0 ]]; then
123
121
SCHEME=" https"
124
122
else
125
123
SCHEME=" http"
You can’t perform that action at this time.
0 commit comments