add postinst doc
fix php 7.3 compatibility issues of typed properties
This commit is contained in:
		
							
								
								
									
										10
									
								
								deb/OpenMediaCenter/DEBIAN/control
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								deb/OpenMediaCenter/DEBIAN/control
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,10 @@
 | 
			
		||||
Package: OpenMediaCenter
 | 
			
		||||
Version: 0.1
 | 
			
		||||
Depends: nginx, php-fpm, php-mysqli, mariadb-server
 | 
			
		||||
Section: web
 | 
			
		||||
Priority: optional
 | 
			
		||||
Architecture: all
 | 
			
		||||
Essential: no
 | 
			
		||||
Installed-Size: 1024
 | 
			
		||||
Maintainer: heili.eu
 | 
			
		||||
Description: OpenMediaCenter
 | 
			
		||||
							
								
								
									
										21
									
								
								deb/OpenMediaCenter/DEBIAN/postinst
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										21
									
								
								deb/OpenMediaCenter/DEBIAN/postinst
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
# enable nginx site
 | 
			
		||||
ln -s /etc/nginx/sites-available/OpenMediaCenter.conf /etc/nginx/sites-enabled/OpenMediaCenter.conf
 | 
			
		||||
 | 
			
		||||
# link general socket to current one
 | 
			
		||||
ln -s /var/run/php/php*-fpm.sock /var/run/php-fpm.sock
 | 
			
		||||
 | 
			
		||||
# 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';"
 | 
			
		||||
mysql -uroot -pPASS -e "GRANT ALL PRIVILEGES ON mediacenter . * TO 'mediacenteruser'@'localhost';"
 | 
			
		||||
mysql -u mediacenteruser -pmediapassword mediacenter < /tmp/openmediacenter.sql
 | 
			
		||||
 | 
			
		||||
# removed unused sql style file
 | 
			
		||||
rm /tmp/openmediacenter.sql
 | 
			
		||||
 | 
			
		||||
# correct user rights
 | 
			
		||||
chown -R www-data:www-data /var/www/openmediacenter
 | 
			
		||||
 | 
			
		||||
# restart services
 | 
			
		||||
systemctl restart nginx
 | 
			
		||||
							
								
								
									
										4
									
								
								deb/OpenMediaCenter/DEBIAN/preinst
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								deb/OpenMediaCenter/DEBIAN/preinst
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,4 @@
 | 
			
		||||
#!/bin/bash
 | 
			
		||||
#preset db password
 | 
			
		||||
debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password password PASS'
 | 
			
		||||
debconf-set-selections <<< 'mariadb-server-10.0 mysql-server/root_password_again password PASS'
 | 
			
		||||
							
								
								
									
										21
									
								
								deb/OpenMediaCenter/etc/nginx/sites-available/OpenMediaCenter.conf
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										21
									
								
								deb/OpenMediaCenter/etc/nginx/sites-available/OpenMediaCenter.conf
									
									
									
									
									
										Executable file
									
								
							@@ -0,0 +1,21 @@
 | 
			
		||||
server {
 | 
			
		||||
    listen 8080 default_server;
 | 
			
		||||
    listen [::]:8080 default_server;
 | 
			
		||||
 | 
			
		||||
    location ~ \.php$ {
 | 
			
		||||
        include snippets/fastcgi-php.conf;
 | 
			
		||||
 | 
			
		||||
        fastcgi_pass unix:/var/run/php-fpm.sock;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    root /var/www/openmediacenter;
 | 
			
		||||
 | 
			
		||||
    index index.html;
 | 
			
		||||
 | 
			
		||||
    access_log /var/log/nginx/openmediacenter.access.log;
 | 
			
		||||
    error_log /var/log/nginx/openmediacenter.error.log;
 | 
			
		||||
 | 
			
		||||
    location / {
 | 
			
		||||
        try_files $uri $uri/ =404;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user