1
0
Fork 0
mirror of https://github.com/iiab/iiab.git synced 2025-03-09 15:40:17 +00:00

templates/iiab-remoteit: Compact prompt conditionals

This commit is contained in:
A Holt 2022-10-09 14:28:52 -04:00 committed by GitHub
parent 3796735b89
commit e30b2bbc0b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -55,7 +55,7 @@ if [ -f /etc/remoteit/config.json ]; then
read -n 1 -r ans < /dev/tty # Prompt for a single character
echo; echo
if [[ $ans = "n" || $ans = "N" ]]; then # Nearly the same as Lines 142-189
if [[ $ans =~ ^[nN]$ ]]; then # Nearly the same as Lines 142-189
echo -e "Let's try to enable remote.it, with your existing /etc/remoteit/config.json...\n"
systemctl enable connectd
@ -88,7 +88,7 @@ echo -en "\e[1m\nOptionally purge + install latest remote.it Device Package? [y/
read -n 1 -r ans < /dev/tty # Prompt for a single character
echo; echo
if [[ $ans = "y" || $ans = "Y" ]]; then
if [[ $ans =~ ^[yY]$ ]]; then
# Full apt path avoids problematic /usr/local/bin/apt on Linux Mint
/usr/bin/apt -y purge "remoteit*" || true