1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/owncast_ynh.git synced 2024-09-03 19:56:20 +02:00

Merge pull request #36 from YunoHost-Apps/testing

source
This commit is contained in:
Éric Gaspar 2023-03-11 22:44:04 +01:00 committed by GitHub
commit 5233d1027c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 46 additions and 117 deletions

View file

@ -18,7 +18,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
Owncast is an open source, self-hosted, decentralized, single user live streaming and chat server for running your own live streams similar in style to the large mainstream options. It offers complete ownership over your content, interface, moderation and audience.
**Shipped version:** 0.0.13~ynh3
**Shipped version:** 0.0.13~ynh4
**Demo:** https://watch.owncast.online/

View file

@ -18,7 +18,7 @@ Si vous navez pas YunoHost, regardez [ici](https://yunohost.org/#/install) po
Owncast est un serveur de diffusion en direct et de chat open source, auto-hébergé, décentralisé et à utilisateur unique pour exécuter vos propres diffusions en direct dans un style similaire aux grandes options grand public. Il offre une propriété complète sur votre contenu, votre interface, votre modération et votre audience.
**Version incluse :** 0.0.13~ynh3
**Version incluse :** 0.0.13~ynh4
**Démo :** https://watch.owncast.online/

View file

@ -1,6 +0,0 @@
SOURCE_URL=https://github.com/owncast/owncast/releases/download/v0.0.13/owncast-0.0.13-linux-64bit.zip
SOURCE_SUM=6a9e012bebdd724592fe966a86902d93d8c74a70b2512a5025002d478b7448b7
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=false
SOURCE_EXTRACT=true

View file

@ -1,6 +0,0 @@
SOURCE_URL=https://github.com/owncast/owncast/releases/download/v0.0.13/owncast-0.0.13-linux-arm64.zip
SOURCE_SUM=b2dba64cb815e32c9c2a242f9d870ad6be407b48cb0416a7e2c089f8965b14b5
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=false
SOURCE_EXTRACT=true

View file

@ -1,6 +0,0 @@
SOURCE_URL=https://github.com/owncast/owncast/releases/download/v0.0.13/owncast-0.0.13-linux-arm7.zip
SOURCE_SUM=8f1e4a482f22baaaab20714fd3931b71115cddb8881a9d6e4c8d7b68c8a3724d
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=zip
SOURCE_IN_SUBDIR=false
SOURCE_EXTRACT=true

View file

@ -1,6 +1,6 @@
## Configuration
You can configure Owncast in the admin page: `__DOMAIN__/admin` with `admin` and `abc123` as credential. Don't forget to change the stream key.
You can configure Owncast in the admin page: `https://__DOMAIN__/admin` with `admin` and `abc123` as credential. Don't forget to change the stream key.
## Streaming app

View file

@ -1,6 +1,6 @@
## Configuration
Vous pouvez configurer Owncast dans la page d'administration : `domain.ltd/admin` avec `admin` et `abc123` comme identifiant. N'oubliez pas de changer la clé de flux (Stream Key).
Vous pouvez configurer Owncast dans la page d'administration : `https://__DOMAIN__/admin` avec `admin` et `abc123` comme identifiant. N'oubliez pas de changer la clé de flux (Stream Key).
## Application de diffusion en continu
@ -12,3 +12,7 @@ OBS peut être utilisé comme application de streaming vidéo : https://obsproje
1. Entrez l'URL du serveur exécutant votre service de streaming au format `rtmp://myserver.net/live`.
1. Saisissez votre « Stream key » qui correspond à votre clé de streaming choisie lors de l'installation.
1. Appuyez sur **Démarrer le streaming** (OBS) ou **Go Live** (Streamlabs) sur OBS.
## Mode de discussion autonome
`https://__DOMAIN__/index-standalone-chat-readwrite.html`

View file

@ -1 +1 @@
You can configure Owncast in the admin page: `__DOMAIN__/admin` with `admin` and `abc123` as credential. Don't forget to change the stream key.
You can configure Owncast in the admin page: `https://__DOMAIN__/admin` with `admin` and `abc123` as credential. Don't forget to change the stream key.

View file

@ -1 +1 @@
Vous pouvez configurer Owncast dans la page d'administration : `__DOMAIN__/admin` avec `admin` et `abc123` comme identifiant. N'oubliez pas de changer la clé de flux (Stream Key).
Vous pouvez configurer Owncast dans la page d'administration : `https://__DOMAIN__/admin` avec `admin` et `abc123` comme identifiant. N'oubliez pas de changer la clé de flux (Stream Key).

View file

@ -5,7 +5,7 @@ name = "Owncast"
description.en = "Self-hosted live video and web chat server for use with existing broadcasting software"
description.fr = "Serveur de vidéo en direct et de chat Web auto-hébergé à utiliser avec un logiciel de diffusion"
version = "0.0.13~ynh3"
version = "0.0.13~ynh4"
maintainers = ["eric_G"]
@ -17,7 +17,7 @@ admindoc = "https://owncast.online/docs/"
code = "https://github.com/owncast/owncast"
[integration]
yunohost = ">= 11.1.12"
yunohost = ">= 11.1.15"
architectures = ["amd64", "armhf", "arm64"]
multi_instance = false
ldap = false
@ -40,6 +40,21 @@ ram.runtime = "50M"
default = "visitors"
[resources]
[resources.sources]
[resources.sources.main]
amd64.url = "https://github.com/owncast/owncast/releases/download/v0.0.13/owncast-0.0.13-linux-64bit.zip"
amd64.sha256 = "6a9e012bebdd724592fe966a86902d93d8c74a70b2512a5025002d478b7448b7"
arm64.url = "https://github.com/owncast/owncast/releases/download/v0.0.13/owncast-0.0.13-linux-arm64.zip"
arm64.sha256 = "b2dba64cb815e32c9c2a242f9d870ad6be407b48cb0416a7e2c089f8965b14b5"
armhf.url = "https://github.com/owncast/owncast/releases/download/v0.0.13/owncast-0.0.13-linux-arm7.zip"
armhf.sha256 = "8f1e4a482f22baaaab20714fd3931b71115cddb8881a9d6e4c8d7b68c8a3724d"
in_subdir = false
[resources.ports]
stream.default = 1935
stream.exposed = "TCP"

View file

@ -15,43 +15,25 @@ source /usr/share/yunohost/helpers
ynh_script_progression --message="Setting up source files..." --weight=4
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --source_id=$YNH_ARCH
ynh_setup_source --dest_dir="$install_dir"
chmod 750 "$install_dir"
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
# SYSTEM CONFIGURATION
#=================================================
ynh_script_progression --message="Configuring NGINX web server..." --weight=1
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Configuring log rotation..." --weight=1
# Use logrotate to manage application logfile(s)
ynh_use_logrotate
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add $app --description="Self-hosted live video and web chat server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_stream"
#=================================================

View file

@ -10,10 +10,11 @@ source _common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD REMOVE
# REMOVE SYSTEM CONFIGURATIONS
#=================================================
# REMOVE SERVICE INTEGRATION IN YUNOHOST
# REMOVE SYSTEMD SERVICE
#=================================================
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
if ynh_exec_warn_less yunohost service status $app >/dev/null
@ -22,35 +23,15 @@ then
yunohost service remove $app
fi
#=================================================
# STOP AND REMOVE SERVICE
#=================================================
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=1
# Remove the dedicated systemd config
ynh_remove_systemd_config
#=================================================
# REMOVE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Removing logrotate configuration..." --weight=1
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
# Remove the dedicated NGINX config
ynh_remove_nginx_config
#=================================================
# REMOVE VARIOUS FILES
#=================================================
ynh_script_progression --message="Removing various files..." --weight=1
# Remove the log files
ynh_secure_remove --file="/var/log/$app"

View file

@ -10,15 +10,6 @@
source ../settings/scripts/_common.sh
source /usr/share/yunohost/helpers
#=================================================
# STANDARD RESTORATION STEPS
#=================================================
# RESTORE THE NGINX CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the NGINX configuration..." --weight=2
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# RESTORE THE APP MAIN DIR
#=================================================
@ -30,42 +21,31 @@ chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# RESTORE SYSTEMD
# RESTORE SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Restoring the systemd configuration..." --weight=1
# RESTORE THE PHP-FPM CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring system configurations related to $app..." --weight=1
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet
#=================================================
# RESTORE THE LOGROTATE CONFIGURATION
#=================================================
ynh_script_progression --message="Restoring the logrotate configuration..." --weight=1
ynh_restore_file --origin_path="/etc/logrotate.d/$app"
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
yunohost service add $app --description="Self-hosted live video and web chat server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_stream"
#=================================================
# START SYSTEMD SERVICE
# GENERIC FINALIZATION
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=3
# RELOAD NGINX AND PHP-FPM OR THE APP SERVICE
#=================================================
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=10
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
sleep 20
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX AND PHP-FPM
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload
#=================================================

View file

@ -33,41 +33,26 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=5
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" --source_id=$YNH_ARCH
ynh_setup_source --dest_dir="$install_dir"
fi
chmod -R o-rwx "$install_dir"
chown -R $app:www-data "$install_dir"
#=================================================
# NGINX CONFIGURATION
# REAPPLY SYSTEM CONFIGURATIONS
#=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=1
ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config
ynh_add_nginx_config
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# SETUP LOGROTATE
#=================================================
ynh_script_progression --message="Upgrading logrotate configuration..." --weight=1
# Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
yunohost service add $app --description="Self-hosted live video and web chat server" --log="/var/log/$app/$app.log" --needs_exposed_ports="$port_stream"
#=================================================