installer modified for Tracker HAT

This commit is contained in:
saeedjohar 2019-10-09 13:55:04 +03:00
parent cbbde5ce23
commit b9eafdc3f6

View File

@ -10,6 +10,7 @@ echo "${YELLOW}1: GSM/GPRS Shield${SET}"
echo "${YELLOW}2: 3G, 4G/LTE Base Shield${SET}" echo "${YELLOW}2: 3G, 4G/LTE Base Shield${SET}"
echo "${YELLOW}3: Cellular IoT App Shield${SET}" echo "${YELLOW}3: Cellular IoT App Shield${SET}"
echo "${YELLOW}4: Cellular IoT HAT${SET}" echo "${YELLOW}4: Cellular IoT HAT${SET}"
echo "${YELLOW}5: Tracker HAT${SET}"
read shield_hat read shield_hat
case $shield_hat in case $shield_hat in
@ -17,6 +18,7 @@ case $shield_hat in
2) echo "${YELLOW}You chose Base Shield${SET}";; 2) echo "${YELLOW}You chose Base Shield${SET}";;
3) echo "${YELLOW}You chose CellularIoT Shield${SET}";; 3) echo "${YELLOW}You chose CellularIoT Shield${SET}";;
4) echo "${YELLOW}You chose CellularIoT HAT${SET}";; 4) echo "${YELLOW}You chose CellularIoT HAT${SET}";;
5) echo "${YELLOW}You chose Tracker HAT${SET}";;
*) echo "${RED}Wrong Selection, exiting${SET}"; exit 1; *) echo "${RED}Wrong Selection, exiting${SET}"; exit 1;
esac esac
@ -59,7 +61,7 @@ if [ $? -ne 0 ]; then
echo "${RED}Download failed${SET}" echo "${RED}Download failed${SET}"
exit 1; exit 1;
fi fi
:'
while [ 1 ] while [ 1 ]
do do
echo "${YELLOW}Do you have updated kernel? [Y/n] ${SET}" echo "${YELLOW}Do you have updated kernel? [Y/n] ${SET}"
@ -74,7 +76,7 @@ do
*) echo "${RED}Wrong Selection, Select among Y or n${SET}";; *) echo "${RED}Wrong Selection, Select among Y or n${SET}";;
esac esac
done done
'
echo "${YELLOW}ppp install${SET}" echo "${YELLOW}ppp install${SET}"
apt-get install ppp apt-get install ppp
@ -160,6 +162,11 @@ do
elif [ $shield_hat -eq 4 ]; then elif [ $shield_hat -eq 4 ]; then
wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/master/ppp_installer/reconnect_cellulariot -O reconnect.sh wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/master/ppp_installer/reconnect_cellulariot -O reconnect.sh
elif [ $shield_hat -eq 5 ]; then
wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/master/ppp_installer/reconnect_tracker -O reconnect.sh
fi fi
mv reconnect.sh /usr/src/ mv reconnect.sh /usr/src/