20 lines
		
	
	
		
			410 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
			
		
		
	
	
			20 lines
		
	
	
		
			410 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
| #!/bin/sh
 | |
| 
 | |
| if [ ! -f "$PWD/.env" ]; then
 | |
|     cp .env.example .env
 | |
| fi
 | |
| if [ ! -d "$PWD/vendor" ]; then
 | |
|     # vendor not exist
 | |
|     composer install
 | |
| fi
 | |
| 
 | |
| source "$PWD/.env"
 | |
| # Do something after get environment
 | |
| 
 | |
| echo '' > ./var/log/apache2_error.log
 | |
| echo '' > ./var/log/apache2_access.log
 | |
| chown apache:apache -R ./var/log/apache2_*
 | |
| chown -R apache:apache /var/www/html
 | |
| chmod -R 775 /var/www/html
 | |
| httpd -D FOREGROUND
 |