mirror of
				https://github.com/iiab/iiab.git
				synced 2025-03-09 15:40:17 +00:00 
			
		
		
		
	templates/iiab-remoteit: Warn if /etc/remoteit/config.json exists...and try it?
This commit is contained in:
		
							parent
							
								
									e142ca6af0
								
							
						
					
					
						commit
						70cc74ac47
					
				
					 1 changed files with 22 additions and 0 deletions
				
			
		|  | @ -50,6 +50,28 @@ fi | |||
| 
 | ||||
| echo -e "\nThis IIAB must be online to begin!\n" | ||||
| 
 | ||||
| if [ -f /etc/remoteit/config.json ]; then | ||||
|     echo -en "For fresh registration let's remove /etc/remoteit/config.json, Ok? [Y/n] " | ||||
|     read -n 1 -r ans < /dev/tty    # Prompt for a single character | ||||
|     echo; echo | ||||
| 
 | ||||
|     if [[ $ans != "y" && $ans != "Y" ]]; then | ||||
|         echo -e "Let's try to enable remote.it, with your existing /etc/remoteit/config.json...\n" | ||||
| 
 | ||||
|         systemctl enable connectd | ||||
|         systemctl restart connectd | ||||
|         systemctl enable schannel | ||||
| 
 | ||||
|         if grep -q '^remoteit_enabled:' /etc/iiab/local_vars.yml; then | ||||
|             sed -i "s/^remoteit_enabled:.*/remoteit_enabled: True/" /etc/iiab/local_vars.yml | ||||
|         else | ||||
|             echo "remoteit_enabled: True" >> /etc/iiab/local_vars.yml | ||||
|         fi | ||||
| 
 | ||||
|         exit 0 | ||||
|     fi | ||||
| fi | ||||
| 
 | ||||
| echo -en "\e[1mOptionally purge + install latest remote.it Device Package? [y/N]\e[0m " | ||||
| read -n 1 -r ans < /dev/tty    # Prompt for a single character | ||||
| echo; echo | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue