implement full load of videos and startdata
modify api where necessary
This commit is contained in:
		@@ -1,5 +1,5 @@
 | 
			
		||||
Package: OpenMediaCenter
 | 
			
		||||
Depends: nginx, php-fpm, php-mysqli, mariadb-server
 | 
			
		||||
Depends: nginx, mariadb-server, mediainfo
 | 
			
		||||
Section: web
 | 
			
		||||
Priority: optional
 | 
			
		||||
Architecture: all
 | 
			
		||||
 
 | 
			
		||||
@@ -2,20 +2,6 @@
 | 
			
		||||
# enable nginx site
 | 
			
		||||
ln -sf /etc/nginx/sites-available/OpenMediaCenter.conf /etc/nginx/sites-enabled/OpenMediaCenter.conf
 | 
			
		||||
 | 
			
		||||
# link general socket to current one
 | 
			
		||||
phpsymlink="/var/run/php/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;"
 | 
			
		||||
mysql -uroot -pPASS -e "CREATE USER IF NOT EXISTS 'mediacenteruser'@'localhost' IDENTIFIED BY 'mediapassword';"
 | 
			
		||||
@@ -31,6 +17,5 @@ chown -R www-data:www-data /var/www/openmediacenter
 | 
			
		||||
# restart services
 | 
			
		||||
systemctl restart nginx
 | 
			
		||||
 | 
			
		||||
# trigger a movie reindex
 | 
			
		||||
php /var/www/openmediacenter/api/extractvideopreviews.php
 | 
			
		||||
rm /tmp/output.log
 | 
			
		||||
systemctl enable OpenMediaCenter.service
 | 
			
		||||
systemctl start OpenMediaCenter.service
 | 
			
		||||
 
 | 
			
		||||
@@ -13,9 +13,7 @@ server {
 | 
			
		||||
        try_files $uri /index.html;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    location ~ \.php$ {
 | 
			
		||||
        include snippets/fastcgi-php.conf;
 | 
			
		||||
 | 
			
		||||
        fastcgi_pass unix:/var/run/php/php-fpm.sock;
 | 
			
		||||
    location /api/ {
 | 
			
		||||
        proxy_pass http://127.0.0.1:8081;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -0,0 +1,12 @@
 | 
			
		||||
[Unit]
 | 
			
		||||
Description=OpenMediaCenter start job
 | 
			
		||||
After=network.target
 | 
			
		||||
 | 
			
		||||
[Service]
 | 
			
		||||
Type=simple
 | 
			
		||||
ExecStart=openmediacenter
 | 
			
		||||
Restart=always
 | 
			
		||||
User=root
 | 
			
		||||
 | 
			
		||||
[Install]
 | 
			
		||||
WantedBy=default.target
 | 
			
		||||
		Reference in New Issue
	
	Block a user