improve creation of symlink for php socket and install dep package for example container
This commit is contained in:
		@@ -1,11 +1,20 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# enable nginx site
 | 
			
		||||
rm /etc/nginx/sites-enabled/OpenMediaCenter.conf
 | 
			
		||||
ln -s /etc/nginx/sites-available/OpenMediaCenter.conf /etc/nginx/sites-enabled/OpenMediaCenter.conf
 | 
			
		||||
ln -sf /etc/nginx/sites-available/OpenMediaCenter.conf /etc/nginx/sites-enabled/OpenMediaCenter.conf
 | 
			
		||||
 | 
			
		||||
# link general socket to current one
 | 
			
		||||
rm /var/run/php-fpm.sock
 | 
			
		||||
ln -s /var/run/php/php*-fpm.sock /var/run/php-fpm.sock
 | 
			
		||||
phpsymlink="/var/run/php-fpm.sock";
 | 
			
		||||
 | 
			
		||||
# create a gneral symlink to the php socket if not already existing
 | 
			
		||||
if [ -L ${phpsymlink} ] ; then
 | 
			
		||||
   if [ -e ${phpsymlink} ] ; then
 | 
			
		||||
      echo "general php symlink already exists."
 | 
			
		||||
   else
 | 
			
		||||
      ln -sf /var/run/php/php*.*-fpm.sock /var/run/php/php-fpm.sock
 | 
			
		||||
   fi
 | 
			
		||||
else
 | 
			
		||||
   ln -sf /var/run/php/php*.*-fpm.sock /var/run/php/php-fpm.sock
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
# setup database
 | 
			
		||||
mysql -uroot -pPASS -e "CREATE DATABASE IF NOT EXISTS mediacenter;"
 | 
			
		||||
 
 | 
			
		||||
@@ -5,7 +5,7 @@ server {
 | 
			
		||||
    location ~ \.php$ {
 | 
			
		||||
        include snippets/fastcgi-php.conf;
 | 
			
		||||
 | 
			
		||||
        fastcgi_pass unix:/var/run/php-fpm.sock;
 | 
			
		||||
        fastcgi_pass unix:/var/run/php/php-fpm.sock;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    root /var/www/openmediacenter;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user