Update install.sh (#505)

* Update install.sh

* Update install.sh

* Update install.sh

* Update install.sh

* Update install.sh

* Update install.sh

* Update install.sh

* Update install.sh

* Update install.sh

* Update install.sh
This commit is contained in:
Nikhil Nandagopal 2020-09-07 22:23:24 +05:30 committed by GitHub
parent a0363691ab
commit a4defd4b28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -9,14 +9,6 @@ is_command_present() {
is_mac() {
[[ $OSTYPE == darwin* ]]
}
curl --location --request POST 'https://api.segment.io/v1/track' \
--header 'Authorization: Basic QjJaM3hXRThXdDRwYnZOWDRORnJPNWZ3VXdnYWtFbk06' \
--header 'Content-Type: application/json' \
--data-raw '{
"anonymousId": "anonymousId",
"event": "Installation Started",
"osType": $OSTYPE
}'
# This function checks if the relevant ports required by Appsmith are available or not
# The script should error out in case they aren't available
check_ports_occupied() {
@ -324,9 +316,20 @@ desired_os=0
echo -e "\U1F575 Detecting your OS"
check_os
curl -s -O --location --request POST 'https://api.segment.io/v1/track' \
--header 'Authorization: Basic QjJaM3hXRThXdDRwYnZOWDRORnJPNWZ3VXdnYWtFbk06' \
--header 'Content-Type: application/json' \
--data-raw '{
"anonymousId": "anonymousId",
"event": "Installation Started",
"properties": {
"osEnum": '$desired_os'
}
}'
if [[ $desired_os -eq 0 ]];then
echo ""
echo "This script is currently meant to install Appsmith on Mac OS X | Ubuntu | RHEL | CentOS machines."
echo "This script is currently meant to install Appsmith on Mac OS X | Ubuntu machines."
echo_contact_support " if you wish to extend this support."
bye
else
@ -535,14 +538,17 @@ if [[ $status_code -ne 401 ]]; then
echo "For troubleshooting help, please reach out to us via our Discord server: https://discord.com/invite/rBTTVJp"
echo "++++++++++++++++++++++++++++++++++++++++"
echo ""
read -rp 'Share your email so we can help you with the installation ' email
curl --location --request POST 'https://api.segment.io/v1/track' \
echo "Share your email so we can help you with the installation"
read -rp 'Email: ' email
curl -s -O --location --request POST 'https://api.segment.io/v1/track' \
--header 'Authorization: Basic QjJaM3hXRThXdDRwYnZOWDRORnJPNWZ3VXdnYWtFbk06' \
--header 'Content-Type: application/json' \
--data-raw '{
"userId": $email,
"userId": "'"$email"'",
"event": "Installation Failed",
"osType": $OSTYPE
"properties": {
"osEnum": '$desired_os'
}
}'
else
echo "+++++++++++ SUCCESS ++++++++++++++++++++++++++++++"
@ -558,14 +564,17 @@ else
echo ""
echo "Need help Getting Started?"
echo "Join our Discord server https://discord.com/invite/rBTTVJp"
read -rp 'Share your email to receive support & updates' email
curl --location --request POST 'https://api.segment.io/v1/track' \
echo "Share your email to receive support & updates"
read -rp 'Email: ' email
curl -s -O --location --request POST 'https://api.segment.io/v1/track' \
--header 'Authorization: Basic QjJaM3hXRThXdDRwYnZOWDRORnJPNWZ3VXdnYWtFbk06' \
--header 'Content-Type: application/json' \
--data-raw '{
"anonymousId": "anonymousId",
"anonymousId": "'"$email"'",
"event": "Installation Success",
"osType": $OSTYPE
"properties": {
"osEnum": '$desired_os'
}
}'
fi