Skip to content

Commit ea77423

Browse files
authored
Merge pull request #3 from badging/fixes
fixes #1
2 parents 6ddaedd + 4dbbddd commit ea77423

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

install.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,23 @@ echo -e "\xE2\x9C\x94 created temporary .env file"
7171
echo
7272

7373
read -p $'\e[1mEnter Webhook URL: \e[22m' webhookurl
74+
75+
#check whether URL is responsive
76+
while true; do
77+
78+
if grep -q "200" <<< "$(curl -Is $webhookurl | head -1)" ; then
79+
echo -e "\xE2\x9C\x94 \e[1m\e[38;5;42m$webhookurl\e[39m is up and running\e[22m"
80+
echo
81+
break
82+
else
83+
echo -e "\xE2\x9D\x8C \e[1m\e[91m$webhookurl\e[39m is not responsive as intended.
84+
Please provide a working Webhook URL as pasted in your GitHub App settings from https://smee.io \e[22m"
85+
echo
86+
read -p $'\e[1mEnter Webhook URL: \e[22m' anotherURL
87+
webhookurl="$anotherURL"
88+
fi
89+
done
90+
7491
echo "webhookURL=$webhookurl" >> .env
7592
echo -e "\xE2\x9C\x94 set webhookURL to $webhookurl"
7693
echo

0 commit comments

Comments
 (0)