mirror of https://github.com/MISP/misp-docker
				
				
				
			Update run.sh to include fixing database name in config.php
If for any reason the name of the database for using misp isn't named "misp", connectivity will fail because database.php does not get updated with the correct name from .env Ran into this when using a forked version of this project where the web container is run in Docker but MySQL database is running in prod database cluster and required a specific naming convention. Other parameters in .env are also not updated or translated into database.php
							parent
							
								
									dd348ba958
								
							
						
					
					
						commit
						d26eaf5dab
					
				| 
						 | 
					@ -92,7 +92,8 @@ if [ -r /.firstboot.tmp ]; then
 | 
				
			||||||
        echo "Creating MISP configuration files"
 | 
					        echo "Creating MISP configuration files"
 | 
				
			||||||
        cd /var/www/MISP/app/Config
 | 
					        cd /var/www/MISP/app/Config
 | 
				
			||||||
	cp -a database.default.php database.php
 | 
						cp -a database.default.php database.php
 | 
				
			||||||
        sed -i "s/localhost/$MYSQL_HOST/" database.php
 | 
					        sed -i "s/'database' => 'misp'/'database' => '$MYSQL_DATABASE'/" database.php
 | 
				
			||||||
 | 
						sed -i "s/localhost/$MYSQL_HOST/" database.php
 | 
				
			||||||
        sed -i "s/db\s*login/$MYSQL_USER/" database.php
 | 
					        sed -i "s/db\s*login/$MYSQL_USER/" database.php
 | 
				
			||||||
        sed -i "s/8889/3306/" database.php
 | 
					        sed -i "s/8889/3306/" database.php
 | 
				
			||||||
        sed -i "s/db\s*password/$MYSQL_PASSWORD/" database.php
 | 
					        sed -i "s/db\s*password/$MYSQL_PASSWORD/" database.php
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue