mirror of
				https://github.com/vmstan/gravity-sync.git
				synced 2025-11-04 01:26:59 -05:00 
			
		
		
		
	Cleanup SSHPASS prompts
This commit is contained in:
		
							parent
							
								
									b53a34b96a
								
							
						
					
					
						commit
						2f21bddd94
					
				@ -11,6 +11,9 @@
 | 
				
			|||||||
**Known Issues**
 | 
					**Known Issues**
 | 
				
			||||||
- No new Star Trek references.
 | 
					- No new Star Trek references.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#### 1.7.8
 | 
				
			||||||
 | 
					- Removes INFO that SSHPASS is not installed during config, if it's not needed.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### 1.7.7
 | 
					#### 1.7.7
 | 
				
			||||||
- `config` function will attempt to ping remote host to validate network connection, can by bypassed by adding `PING_AVOID='1'` to your `gravity-sync.conf` file.
 | 
					- `config` function will attempt to ping remote host to validate network connection, can by bypassed by adding `PING_AVOID='1'` to your `gravity-sync.conf` file.
 | 
				
			||||||
- Changes some [INFO] messages to [WARN] where approprate.
 | 
					- Changes some [INFO] messages to [WARN] where approprate.
 | 
				
			||||||
@ -23,7 +26,7 @@
 | 
				
			|||||||
- Less chatty about replication validation if it's not necessary.
 | 
					- Less chatty about replication validation if it's not necessary.
 | 
				
			||||||
- Less chatty about file validation if no changes are required.
 | 
					- Less chatty about file validation if no changes are required.
 | 
				
			||||||
- When applying `update` in DEV mode, the Git branch used will be shown.
 | 
					- When applying `update` in DEV mode, the Git branch used will be shown.
 | 
				
			||||||
- Validates log export operation
 | 
					- Validates log export operation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#### 1.7.6
 | 
					#### 1.7.6
 | 
				
			||||||
- Detects `dbclient` install as alternative to OpenSSH Client.
 | 
					- Detects `dbclient` install as alternative to OpenSSH Client.
 | 
				
			||||||
 | 
				
			|||||||
@ -872,7 +872,7 @@ function config_generate {
 | 
				
			|||||||
	cp $HOME/${LOCAL_FOLDR}/${CONFIG_FILE}.example $HOME/${LOCAL_FOLDR}/${CONFIG_FILE}
 | 
						cp $HOME/${LOCAL_FOLDR}/${CONFIG_FILE}.example $HOME/${LOCAL_FOLDR}/${CONFIG_FILE}
 | 
				
			||||||
	error_validate
 | 
						error_validate
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	MESSAGE="Enter IP or DNS of primary Pi-hole server"
 | 
						MESSAGE="IP or DNS of primary Pi-hole"
 | 
				
			||||||
	echo_need
 | 
						echo_need
 | 
				
			||||||
	read INPUT_REMOTE_HOST
 | 
						read INPUT_REMOTE_HOST
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -887,7 +887,7 @@ function config_generate {
 | 
				
			|||||||
		echo_warn
 | 
							echo_warn
 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
	MESSAGE="Enter SSH user with SUDO rights on primary Pi-hole server"
 | 
						MESSAGE="SSH User with SUDO rights"
 | 
				
			||||||
	echo_need
 | 
						echo_need
 | 
				
			||||||
	read INPUT_REMOTE_USER
 | 
						read INPUT_REMOTE_USER
 | 
				
			||||||
	
 | 
						
 | 
				
			||||||
@ -904,14 +904,15 @@ function config_generate {
 | 
				
			|||||||
	if hash sshpass 2>/dev/null
 | 
						if hash sshpass 2>/dev/null
 | 
				
			||||||
	then
 | 
						then
 | 
				
			||||||
		MESSAGE="SSHPASS Utility Detected"
 | 
							MESSAGE="SSHPASS Utility Detected"
 | 
				
			||||||
 | 
							echo_warn
 | 
				
			||||||
 | 
								if hash ssh 2>/dev/null
 | 
				
			||||||
 | 
									MESSAGE="Before proceeding reference ${BLUE}https://github.com/vmstan/gravity-sync/blob/master/ADVANCED.md#ssh-configuration${NC}"
 | 
				
			||||||
				echo_info
 | 
									echo_info
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		MESSAGE="Do you want to configure password based SSH authentication?"
 | 
									MESSAGE="Leave blank to use SSH Key-Pair"
 | 
				
			||||||
		echo_warn
 | 
					 | 
				
			||||||
		MESSAGE="Your password will be stored clear-text in the ${CONFIG_FILE}!"
 | 
					 | 
				
			||||||
				echo_warn
 | 
									echo_warn
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
		MESSAGE="Leave blank to use (preferred) SSH Key-Pair Authentication"
 | 
									MESSAGE="SSH User Password"
 | 
				
			||||||
				echo_need
 | 
									echo_need
 | 
				
			||||||
				read INPUT_REMOTE_PASS
 | 
									read INPUT_REMOTE_PASS
 | 
				
			||||||
				
 | 
									
 | 
				
			||||||
@ -919,13 +920,15 @@ function config_generate {
 | 
				
			|||||||
				echo_stat
 | 
									echo_stat
 | 
				
			||||||
				sed -i "/REMOTE_PASS=''/c\REMOTE_PASS='${INPUT_REMOTE_PASS}'" $HOME/${LOCAL_FOLDR}/${CONFIG_FILE}
 | 
									sed -i "/REMOTE_PASS=''/c\REMOTE_PASS='${INPUT_REMOTE_PASS}'" $HOME/${LOCAL_FOLDR}/${CONFIG_FILE}
 | 
				
			||||||
					error_validate
 | 
										error_validate
 | 
				
			||||||
		
 | 
								elif hash dbclient 2>/dev/null
 | 
				
			||||||
 | 
									MESSAGE="Dropbear SSH Detected"
 | 
				
			||||||
 | 
									echo_warn
 | 
				
			||||||
 | 
									MESSAGE="Skipping Password Setup"
 | 
				
			||||||
 | 
									echo_info
 | 
				
			||||||
 | 
								fi	
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
		MESSAGE="SSHPASS Not Installed"
 | 
						#	MESSAGE="Defaulting to SSH Key-Pair Authentication"
 | 
				
			||||||
		echo_info
 | 
						#	echo_info
 | 
				
			||||||
		
 | 
					 | 
				
			||||||
		MESSAGE="Defaulting to SSH Key-Pair Authentication"
 | 
					 | 
				
			||||||
		echo_info
 | 
					 | 
				
			||||||
	fi
 | 
						fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if [ -z $INPUT_REMOTE_PASS ]
 | 
						if [ -z $INPUT_REMOTE_PASS ]
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user