| 
				
			 | 
			
			
				@@ -49,6 +49,22 @@ function configure_firewall_for_dlna { 
			 | 
		
	
		
			
			| 
				49
			 | 
			
				49
			 | 
			
			
				 	echo 'configure_firewall_for_dlna' >> $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				50
			 | 
			
				50
			 | 
			
			
				 } 
			 | 
		
	
		
			
			| 
				51
			 | 
			
				51
			 | 
			
			
				  
			 | 
		
	
		
			
			| 
				
			 | 
			
				52
			 | 
			
			
				+function remove_dlna_server { 
			 | 
		
	
		
			
			| 
				
			 | 
			
				53
			 | 
			
			
				+	if ! grep -Fxq "install_dlna_server" $COMPLETION_FILE; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				54
			 | 
			
			
				+		return 
			 | 
		
	
		
			
			| 
				
			 | 
			
				55
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				56
			 | 
			
			
				+	service minidlna stop 
			 | 
		
	
		
			
			| 
				
			 | 
			
				57
			 | 
			
			
				+	apt-get -y remove --purge minidlna 
			 | 
		
	
		
			
			| 
				
			 | 
			
				58
			 | 
			
			
				+	if [ -f /etc/minidlna.conf ]; then 
			 | 
		
	
		
			
			| 
				
			 | 
			
				59
			 | 
			
			
				+		rm /etc/minidlna.conf 
			 | 
		
	
		
			
			| 
				
			 | 
			
				60
			 | 
			
			
				+	fi 
			 | 
		
	
		
			
			| 
				
			 | 
			
				61
			 | 
			
			
				+	iptables -D INPUT -p udp --dport 1900 -j ACCEPT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				62
			 | 
			
			
				+	iptables -D INPUT -p tcp --dport 8200 -j ACCEPT 
			 | 
		
	
		
			
			| 
				
			 | 
			
				63
			 | 
			
			
				+	function_check save_firewall_settings 
			 | 
		
	
		
			
			| 
				
			 | 
			
				64
			 | 
			
			
				+	save_firewall_settings 
			 | 
		
	
		
			
			| 
				
			 | 
			
				65
			 | 
			
			
				+	sed -i '/install_dlna_server/d' $COMPLETION_FILE 
			 | 
		
	
		
			
			| 
				
			 | 
			
				66
			 | 
			
			
				+} 
			 | 
		
	
		
			
			| 
				
			 | 
			
				67
			 | 
			
			
				+ 
			 | 
		
	
		
			
			| 
				52
			 | 
			
				68
			 | 
			
			
				 function install_dlna_server { 
			 | 
		
	
		
			
			| 
				53
			 | 
			
				69
			 | 
			
			
				 	if grep -Fxq "install_dlna_server" $COMPLETION_FILE; then 
			 | 
		
	
		
			
			| 
				54
			 | 
			
				70
			 | 
			
			
				 		return 
			 |