Optionally enable http/https
This commit is contained in:
		
							parent
							
								
									e479918bc1
								
							
						
					
					
						commit
						f58217a54a
					
				
					 1 changed files with 15 additions and 2 deletions
				
			
		
							
								
								
									
										13
									
								
								install.sh
									
										
									
									
									
								
							
							
						
						
									
										13
									
								
								install.sh
									
										
									
									
									
								
							| 
						 | 
					@ -48,6 +48,14 @@ case "$REPLY_SSH_KEYS" in
 | 
				
			||||||
  * ) echo "invalid";;
 | 
					  * ) echo "invalid";;
 | 
				
			||||||
esac
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					echo
 | 
				
			||||||
 | 
					read -p "Configure for http+https? " -n 1 -r REPLY_HTTPHTTPS
 | 
				
			||||||
 | 
					case "$REPLY_HTTPHTTPS" in 
 | 
				
			||||||
 | 
					  y|Y ) echo "yes";;
 | 
				
			||||||
 | 
					  n|N ) echo "no";;
 | 
				
			||||||
 | 
					  * ) echo "invalid";;
 | 
				
			||||||
 | 
					esac
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Make a sane environment
 | 
					# Make a sane environment
 | 
				
			||||||
echo -e "\e[1;32mSetting up environment...\e[0m"
 | 
					echo -e "\e[1;32mSetting up environment...\e[0m"
 | 
				
			||||||
echo "deb https://deb.debian.org/debian/ bookworm main contrib non-free-firmware non-free" > /etc/apt/sources.list
 | 
					echo "deb https://deb.debian.org/debian/ bookworm main contrib non-free-firmware non-free" > /etc/apt/sources.list
 | 
				
			||||||
| 
						 | 
					@ -230,8 +238,13 @@ echo -e "\e[1;32mConfiguring firewall...\e[0m"
 | 
				
			||||||
ufw default deny incoming
 | 
					ufw default deny incoming
 | 
				
			||||||
ufw default allow outgoing
 | 
					ufw default allow outgoing
 | 
				
			||||||
ufw allow ${SSH_PORT}/tcp
 | 
					ufw allow ${SSH_PORT}/tcp
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [[ $REPLY_HTTPHTTPS =~ ^[Yy]$ ]]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
  ufw allow http
 | 
					  ufw allow http
 | 
				
			||||||
  ufw allow https
 | 
					  ufw allow https
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
ufw enable
 | 
					ufw enable
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Install crowdsec
 | 
					# Install crowdsec
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue