improve creation of symlink for php socket and install dep package for example container

This commit is contained in:
2020-10-22 19:36:29 +02:00
parent 8f7ba53c39
commit 5eed1849bc
3 changed files with 18 additions and 9 deletions

View File

@ -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;"

View File

@ -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;