25 lines
		
	
	
		
			472 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			472 B
		
	
	
	
		
			Bash
		
	
	
		
			Executable File
		
	
	
	
	
| #!/bin/sh
 | |
| 
 | |
| # Check if nginx is running
 | |
| /etc/init.d/nginx status >/dev/null 2>&1
 | |
| if [ $? -ne 0 ]; then
 | |
| 	NGINX="nginx failed!"
 | |
| fi
 | |
| 
 | |
| # Check if MariaDB is running
 | |
| /etc/init.d/mariadb status >/dev/null 2>&1
 | |
| if [ $? -ne 0 ]; then
 | |
| 	MARIADB="mariadb failed!"
 | |
| fi
 | |
| 
 | |
| # Check if PHP-FPM is running
 | |
| /etc/init.d/php8.2-fpm status >/dev/null 2>&1
 | |
| if [ $? -ne 0 ]; then
 | |
| 	PHP82="php8.2-fpm failed!"
 | |
| fi
 | |
| 
 | |
| if [ -n "$NGINX$MARIADB$PHP82" ]; then
 | |
|     echo "$NGINX $MARIADB $PHP82" && exit 1
 | |
| fi
 | |
| 
 |