|  | @@ -32,6 +32,25 @@ IPFS_GO_REPO="https://github.com/ipfs/go-ipfs"
 | 
	
		
			
			| 32 | 32 |  IPFS_COMMIT='20b06a4cbce8884f5b194da6e98cb11f2c77f166'
 | 
	
		
			
			| 33 | 33 |  IPFS_PORT=4001
 | 
	
		
			
			| 34 | 34 |  
 | 
	
		
			
			|  | 35 | +function remove_ipfs {
 | 
	
		
			
			|  | 36 | +	if ! grep -Fxq "install_ipfs" $COMPLETION_FILE; then
 | 
	
		
			
			|  | 37 | +		return
 | 
	
		
			
			|  | 38 | +	fi
 | 
	
		
			
			|  | 39 | +	function_check select_go_version
 | 
	
		
			
			|  | 40 | +	select_go_version
 | 
	
		
			
			|  | 41 | +	systemctl stop ipfs
 | 
	
		
			
			|  | 42 | +	systemctl disable ipfs
 | 
	
		
			
			|  | 43 | +	systemctl daemon-reload
 | 
	
		
			
			|  | 44 | +	rm /etc/systemd/system/ipfs.service
 | 
	
		
			
			|  | 45 | +	rm -rf $GOPATH/src/github.com/ipfs
 | 
	
		
			
			|  | 46 | +	iptables -D INPUT -p tcp --dport $IPFS_PORT -j ACCEPT
 | 
	
		
			
			|  | 47 | +	function_check save_firewall_settings
 | 
	
		
			
			|  | 48 | +	save_firewall_settings
 | 
	
		
			
			|  | 49 | +	sed -i '/install_ipfs/d' $COMPLETION_FILE
 | 
	
		
			
			|  | 50 | +	sed -i '/ipfs /d' $COMPLETION_FILE
 | 
	
		
			
			|  | 51 | +	sed -i '/configure_firewall_for_ipfs/d' $COMPLETION_FILE
 | 
	
		
			
			|  | 52 | +}
 | 
	
		
			
			|  | 53 | +
 | 
	
		
			
			| 35 | 54 |  function configure_firewall_for_ipfs {
 | 
	
		
			
			| 36 | 55 |  	if [[ $SYSTEM_TYPE == "$VARIANT_MAILBOX" || $SYSTEM_TYPE == "$VARIANT_CHAT" ]]; then
 | 
	
		
			
			| 37 | 56 |  		return
 |