mirror of
https://github.com/YunoHost-Apps/peertube_ynh.git
synced 2024-09-03 19:56:29 +02:00
commit
032acd21b3
11 changed files with 32 additions and 13 deletions
|
@ -22,7 +22,7 @@ Servers are run independently by different people and organizations. They can ap
|
|||
|
||||
By watching a video, you help the hosting provider to broadcast it by becoming a broadcaster of the video yourself. Each instance doesn’t need much money to broadcast the videos of its users.
|
||||
|
||||
**Shipped version:** 1.4.1
|
||||
**Shipped version:** 2.0.0
|
||||
|
||||
## Important points to read before installing
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
multi_instance=1
|
||||
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
|
||||
# incorrect_path=1
|
||||
port_already_use=1
|
||||
port_already_use=0
|
||||
change_url=0
|
||||
;;; Levels
|
||||
# If the level 5 (Package linter) is forced to 1. Please add justifications here.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v1.4.1/peertube-v1.4.1.tar.xz
|
||||
SOURCE_SUM=49da83b9143ac4a6a486eff7b726830923022a97c6a692722bda20044fe6cd70
|
||||
SOURCE_URL=https://github.com/Chocobozzz/PeerTube/releases/download/v2.0.0/peertube-v2.0.0.tar.xz
|
||||
SOURCE_SUM=5a9e7b5f7ca8ee191060427e193a2182a56e86d5946094ebbc905a07b9b6b703
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.xz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
|
|
7
conf/nginx_regen_conf.hook
Normal file
7
conf/nginx_regen_conf.hook
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash
|
||||
|
||||
pending_conf=$4
|
||||
if [[ "$1" == "pre" ]]
|
||||
then
|
||||
sed --in-place "s/X-Frame-Options : SAMEORIGIN/X-Frame-Options : ALLOWALL/g" "${pending_conf}/../nginx/etc/nginx/conf.d/__DOMAIN__.conf"
|
||||
fi
|
|
@ -223,8 +223,7 @@ transcoding:
|
|||
720p: false
|
||||
1080p: false
|
||||
2160p: false
|
||||
# /!\ EXPERIMENTAL /!\
|
||||
# /!\ Requires ffmpeg >= 4
|
||||
# /!\ Requires ffmpeg >= 4.1
|
||||
# Generate HLS playlists and fragmented MP4 files. Better playback than with WebTorrent:
|
||||
# * Resolution change is smoother
|
||||
# * Faster playback in particular with long videos
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"en": "Video streaming platform using P2P directly in the web browser, connected to a federated network",
|
||||
"fr": "Plateforme de diffusion vidéo par P2P directement dans le navigateur, et connectée à un réseau fédéralisé"
|
||||
},
|
||||
"version": "1.4.1~ynh1",
|
||||
"version": "2.0.0~ynh1",
|
||||
"url": "https://github.com/Chocobozzz/PeerTube",
|
||||
"license": "AGPL-3.0-only",
|
||||
"maintainer": [
|
||||
|
|
|
@ -63,6 +63,13 @@ ynh_psql_dump_db --database="$db_name" > db.sql
|
|||
|
||||
#=================================================
|
||||
# SPECIFIC BACKUP
|
||||
#=================================================
|
||||
# BACKUP HOOK
|
||||
#=================================================
|
||||
ynh_print_info --message="Backing up hook configuration..."
|
||||
|
||||
ynh_backup --src_path="/usr/share/yunohost/hooks/conf_regen/15-nginx_$app"
|
||||
|
||||
#=================================================
|
||||
# BACKUP LOGROTATE
|
||||
#=================================================
|
||||
|
|
|
@ -125,7 +125,7 @@ ynh_add_nginx_config
|
|||
ynh_print_info --message="Configuring system user..."
|
||||
|
||||
# Create a system user
|
||||
ynh_system_user_create --username=$app
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC SETUP
|
||||
|
@ -162,7 +162,9 @@ cp ../conf/local-production.json "$final_path/config/local-production.json"
|
|||
# FIX NGINX DOMAIN CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_string="X-Frame-Options : ALLOWALL" --target_file="/etc/nginx/conf.d/$domain.conf"
|
||||
cp -R ../conf/nginx_regen_conf.hook /usr/share/yunohost/hooks/conf_regen/15-nginx_$app
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="/usr/share/yunohost/hooks/conf_regen/15-nginx_$app"
|
||||
yunohost tools regen-conf nginx
|
||||
|
||||
#=================================================
|
||||
# STORE THE CHECKSUM OF THE CONFIG FILE
|
||||
|
|
|
@ -102,7 +102,8 @@ fi
|
|||
# RESTORE ORIGINAL NGINX DOMAIN CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string --match_string="X-Frame-Options : ALLOWALL" --replace_string="X-Frame-Options : SAMEORIGIN" --target_file="/etc/nginx/conf.d/$domain.conf"
|
||||
ynh_secure_remove --file="/usr/share/yunohost/hooks/conf_regen/15-nginx_$app"
|
||||
yunohost tools regen-conf nginx
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -66,7 +66,7 @@ ynh_restore_file --origin_path="$final_path"
|
|||
ynh_print_info --message="Recreating the dedicated system user..."
|
||||
|
||||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
ynh_system_user_create --username=$app --home_dir=$final_path
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
|
@ -105,7 +105,8 @@ ynh_install_extra_app_dependencies --repo="deb https://dl.yarnpkg.com/debian/ st
|
|||
# FIX NGINX DOMAIN CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_string="X-Frame-Options : ALLOWALL" --target_file="/etc/nginx/conf.d/$domain.conf"
|
||||
ynh_restore_file --origin_path="/usr/share/yunohost/hooks/conf_regen/15-nginx_$app"
|
||||
yunohost tools regen-conf nginx
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE POSTGRESQL DATABASE
|
||||
|
|
|
@ -188,7 +188,9 @@ ynh_store_file_checksum --file="$final_path/config/production.yaml"
|
|||
# FIX NGINX DOMAIN CONFIGURATION
|
||||
#=================================================
|
||||
|
||||
ynh_replace_string --match_string="X-Frame-Options : SAMEORIGIN" --replace_string="X-Frame-Options : ALLOWALL" --target_file="/etc/nginx/conf.d/$domain.conf"
|
||||
cp -R ../conf/nginx_regen_conf.hook /usr/share/yunohost/hooks/conf_regen/15-nginx_$app
|
||||
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="/usr/share/yunohost/hooks/conf_regen/15-nginx_$app"
|
||||
yunohost tools regen-conf nginx
|
||||
|
||||
#=================================================
|
||||
# BUILD YARN DEPENDENCIES
|
||||
|
|
Loading…
Reference in a new issue