1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/streama_ynh.git synced 2024-09-03 20:26:30 +02:00

Merge pull request #45 from YunoHost-Apps/testing

Testing
This commit is contained in:
Alexandre Aubin 2024-06-09 16:47:47 +02:00 committed by GitHub
commit 8f3f0ffd41
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 128 additions and 103 deletions

View file

@ -1,6 +1,7 @@
# All available README files by language # All available README files by language
- [Read the README in English](README.md) - [Read the README in English](README.md)
- [Irakurri README euskaraz](README_eu.md)
- [Lire le README en français](README_fr.md) - [Lire le README en français](README_fr.md)
- [Le o README en galego](README_gl.md) - [Le o README en galego](README_gl.md)
- [Leggi il “README” in italiano](README_it.md) - [阅读中文(简体)的 README](README_zh_Hans.md)

View file

@ -9,7 +9,7 @@ It shall NOT be edited by hand.
[![Install Streama with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=streama) [![Install Streama with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=streama)
*[Read this README is other languages.](./ALL_README.md)* *[Read this README in other languages.](./ALL_README.md)*
> *This package allows you to install Streama quickly and simply on a YunoHost server.* > *This package allows you to install Streama quickly and simply on a YunoHost server.*
> *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.* > *If you don't have YunoHost, please consult [the guide](https://yunohost.org/install) to learn how to install it.*
@ -18,7 +18,7 @@ It shall NOT be edited by hand.
Self hosted streaming media server Self hosted streaming media server
**Shipped version:** 1.10.5~ynh1 **Shipped version:** 1.10.5~ynh2
**Demo:** <https://streama.demo-version.net> **Demo:** <https://streama.demo-version.net>

49
README_eu.md Normal file
View file

@ -0,0 +1,49 @@
<!--
Ohart ongi: README hau automatikoki sortu da <https://github.com/YunoHost/apps/tree/master/tools/readme_generator>ri esker
EZ editatu eskuz.
-->
# Streama YunoHost-erako
[![Integrazio maila](https://dash.yunohost.org/integration/streama.svg)](https://dash.yunohost.org/appci/app/streama) ![Funtzionamendu egoera](https://ci-apps.yunohost.org/ci/badges/streama.status.svg) ![Mantentze egoera](https://ci-apps.yunohost.org/ci/badges/streama.maintain.svg)
[![Instalatu Streama YunoHost-ekin](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=streama)
*[Irakurri README hau beste hizkuntzatan.](./ALL_README.md)*
> *Pakete honek Streama YunoHost zerbitzari batean azkar eta zailtasunik gabe instalatzea ahalbidetzen dizu.*
> *YunoHost ez baduzu, kontsultatu [gida](https://yunohost.org/install) nola instalatu ikasteko.*
## Aurreikuspena
Self hosted streaming media server
**Paketatutako bertsioa:** 1.10.5~ynh2
**Demoa:** <https://streama.demo-version.net>
## Pantaila-argazkiak
![Streama(r)en pantaila-argazkia](./doc/screenshots/screenshot.png)
## Dokumentazioa eta baliabideak
- Aplikazioaren webgune ofiziala: <https://streamaserver.org/>
- Administratzaileen dokumentazio ofiziala: <https://docs.streama-project.com/>
- Jatorrizko aplikazioaren kode-gordailua: <https://github.com/streamaserver/streama>
- YunoHost Denda: <https://apps.yunohost.org/app/streama>
- Eman errore baten berri: <https://github.com/YunoHost-Apps/streama_ynh/issues>
## Garatzaileentzako informazioa
Bidali `pull request`a [`testing` abarrera](https://github.com/YunoHost-Apps/streama_ynh/tree/testing).
`testing` abarra probatzeko, ondorengoa egin:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/streama_ynh/tree/testing --debug
edo
sudo yunohost app upgrade streama -u https://github.com/YunoHost-Apps/streama_ynh/tree/testing --debug
```
**Informazio gehiago aplikazioaren paketatzeari buruz:** <https://yunohost.org/packaging_apps>

View file

@ -18,7 +18,7 @@ Il NE doit PAS être modifié à la main.
Self hosted streaming media server Self hosted streaming media server
**Version incluse:** 1.10.5~ynh1 **Version incluse:** 1.10.5~ynh2
**Démo:** <https://streama.demo-version.net> **Démo:** <https://streama.demo-version.net>

View file

@ -18,7 +18,7 @@ NON debe editarse manualmente.
Self hosted streaming media server Self hosted streaming media server
**Versión proporcionada:** 1.10.5~ynh1 **Versión proporcionada:** 1.10.5~ynh2
**Demo:** <https://streama.demo-version.net> **Demo:** <https://streama.demo-version.net>

49
README_zh_Hans.md Normal file
View file

@ -0,0 +1,49 @@
<!--
注意:此 README 由 <https://github.com/YunoHost/apps/tree/master/tools/readme_generator> 自动生成
请勿手动编辑。
-->
# YunoHost 的 Streama
[![集成程度](https://dash.yunohost.org/integration/streama.svg)](https://dash.yunohost.org/appci/app/streama) ![工作状态](https://ci-apps.yunohost.org/ci/badges/streama.status.svg) ![维护状态](https://ci-apps.yunohost.org/ci/badges/streama.maintain.svg)
[![使用 YunoHost 安装 Streama](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=streama)
*[阅读此 README 的其它语言版本。](./ALL_README.md)*
> *通过此软件包,您可以在 YunoHost 服务器上快速、简单地安装 Streama。*
> *如果您还没有 YunoHost请参阅[指南](https://yunohost.org/install)了解如何安装它。*
## 概况
Self hosted streaming media server
**分发版本:** 1.10.5~ynh2
**演示:** <https://streama.demo-version.net>
## 截图
![Streama 的截图](./doc/screenshots/screenshot.png)
## 文档与资源
- 官方应用网站: <https://streamaserver.org/>
- 官方管理文档: <https://docs.streama-project.com/>
- 上游应用代码库: <https://github.com/streamaserver/streama>
- YunoHost 商店: <https://apps.yunohost.org/app/streama>
- 报告 bug <https://github.com/YunoHost-Apps/streama_ynh/issues>
## 开发者信息
请向 [`testing` 分支](https://github.com/YunoHost-Apps/streama_ynh/tree/testing) 发送拉取请求。
如要尝试 `testing` 分支,请这样操作:
```bash
sudo yunohost app install https://github.com/YunoHost-Apps/streama_ynh/tree/testing --debug
sudo yunohost app upgrade streama -u https://github.com/YunoHost-Apps/streama_ynh/tree/testing --debug
```
**有关应用打包的更多信息:** <https://yunohost.org/packaging_apps>

View file

@ -5,9 +5,9 @@ name = "Streama"
description.en = "streaming media server" description.en = "streaming media server"
description.fr = "Serveur de streaming" description.fr = "Serveur de streaming"
version = "1.10.5~ynh1" version = "1.10.5~ynh2"
maintainers = [""] maintainers = []
[upstream] [upstream]
license = "MIT" license = "MIT"
@ -31,8 +31,8 @@ ram.runtime = "50M"
type = "domain" type = "domain"
[install.init_main_permission] [install.init_main_permission]
help.en = "If enabled, Streama will be accessible by people who do not have an account. This can be changed later via the webadmin." help.en = "If 'visitors', Streama will be accessible by people who do not have an account. This can be changed later via the webadmin."
help.fr = "Si cette case est cochée, Streama sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin." help.fr = "Si 'Visiteurs', Streama sera accessible aux personnes nayant pas de compte. Vous pourrez changer ceci plus tard via la webadmin."
type = "group" type = "group"
default = "visitors" default = "visitors"
@ -41,8 +41,9 @@ ram.runtime = "50M"
url = "https://github.com/streamaserver/streama/releases/download/v1.10.5/streama-1.10.5.jar" url = "https://github.com/streamaserver/streama/releases/download/v1.10.5/streama-1.10.5.jar"
sha256 = "d456369c2f712cbf7749f4bc46268fe331a1d91c29fe0d89e910f8589c4a2603" sha256 = "d456369c2f712cbf7749f4bc46268fe331a1d91c29fe0d89e910f8589c4a2603"
extract = false extract = false
format = "jar"
rename = "streama.jar" rename = "streama.jar"
autoupdate.strategy = "latest_github_release"
autoupdate.asset = "^streama-.*.jar$"
[resources.ports] [resources.ports]
@ -60,10 +61,9 @@ ram.runtime = "50M"
packages = "ffmpeg, mariadb-server" packages = "ffmpeg, mariadb-server"
packages_from_raw_bash = """ packages_from_raw_bash = """
debian=$(lsb_release --codename --short) if [[ $YNH_DEBIAN_VERSION == "bullseye" ]]; then
if [[ $debian = "bullseye" ]]; then
echo "openjdk-11-jre"; echo "openjdk-11-jre";
elif [[ $debian = "bookworm" ]]; then elif [[ $YNH_DEBIAN_VERSION == "bookworm" ]]; then
echo "openjdk-17-jre"; echo "openjdk-17-jre";
fi fi
""" """

View file

@ -4,9 +4,6 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
# dependencies used by the app
#REMOVEME? pkg_dependencies="openjdk-17-jre-headless ffmpeg"
#================================================= #=================================================
# PERSONAL HELPERS # PERSONAL HELPERS
#================================================= #=================================================

View file

@ -22,50 +22,28 @@ chown -R $app:www-data "$install_dir"
chmod +x $install_dir/streama.jar chmod +x $install_dir/streama.jar
#================================================= #=================================================
# NGINX CONFIGURATION # SYSTEM CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Configuring NGNX web server..." --weight=3 ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
# Create a dedicated systemd config
ynh_add_systemd_config
yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# ADD A CONFIGURATION # ADD A CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
ynh_add_config --template="../conf/application.yaml" --destination="$install_dir/application.yaml" ynh_add_config --template="application.yaml" --destination="$install_dir/application.yaml"
chmod 400 "$install_dir/application.yaml" chmod 400 "$install_dir/application.yaml"
chown $app:$app "$install_dir/application.yaml" chown $app:$app "$install_dir/application.yaml"
#=================================================
# ADD A CONFIGURATION
#=================================================
#ynh_script_progression --message="Adding a configuration file..."
# Set permissions to app files
#ln -s $data_dir $install_dir/data/streama
#ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies"
#chmod +x "/usr/bin/convert_movies"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Configuring a systemd service..." --weight=1
# Create a dedicated systemd config
ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================

View file

@ -10,10 +10,11 @@ source _common.sh
source /usr/share/yunohost/helpers 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`) # 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 if ynh_exec_warn_less yunohost service status $app >/dev/null

View file

@ -23,7 +23,7 @@ chown -R $app:www-data "$install_dir"
#================================================= #=================================================
# RESTORE THE DATA DIRECTORY # RESTORE THE DATA DIRECTORY
#================================================= #=================================================
ynh_script_progression --message="Restoring the data directory..." ynh_script_progression --message="Restoring the data directory..." --weight=2
ynh_restore_file --origin_path="$data_dir" --not_mandatory ynh_restore_file --origin_path="$data_dir" --not_mandatory
@ -32,33 +32,13 @@ chown -R $app:www-data "$data_dir"
#================================================= #=================================================
# RESTORE THE NGINX CONFIGURATION # RESTORE THE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Restoring the NGINX web server configuration..." ynh_script_progression --message="Restoring the NGINX web server configuration..." --weight=2
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
#=================================================
# ADD A CONFIGURATION
#=================================================
#ynh_script_progression --message="Adding a configuration file..."
# Set permissions to app files
#ln -s $data_dir $install_dir/data/streama
#ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies"
#chmod +x "/usr/bin/convert_movies"
#=================================================
# RESTORE SYSTEMD
#=================================================
ynh_script_progression --message="Restoring the systemd configuration..." --weight=2
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet systemctl enable $app.service --quiet
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log" yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log"
#================================================= #=================================================
@ -68,13 +48,6 @@ ynh_script_progression --message="Starting a systemd service..." --weight=2
ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Grails application running at" ynh_systemd_action --service_name=$app --action="start" --log_path=systemd --line_match="Grails application running at"
#=================================================
# GENERIC FINALIZATION
#=================================================
# RELOAD NGINX
#=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload
#================================================= #=================================================

View file

@ -33,7 +33,7 @@ then
ynh_script_progression --message="Upgrading source files..." --weight=1 ynh_script_progression --message="Upgrading source files..." --weight=1
# Download, check integrity, uncompress and patch the source from app.src # Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir" --keep="application.yaml"
fi fi
chmod -R o-rwx "$install_dir" chmod -R o-rwx "$install_dir"
@ -41,39 +41,16 @@ chown -R $app:www-data "$install_dir"
chmod +x $install_dir/streama.jar chmod +x $install_dir/streama.jar
#================================================= #=================================================
# NGINX CONFIGURATION # REAPPLY SYSTEM CONFIGURATIONS
#================================================= #=================================================
ynh_script_progression --message="Upgrading NGINX web server configuration..." --weight=24 ynh_script_progression --message="Upgrading system configurations related to $app..." --weight=1
# Create a dedicated NGINX config # Create a dedicated NGINX config
ynh_add_nginx_config ynh_add_nginx_config
#=================================================
# SPECIFIC UPGRADE
#=================================================
# UPDATE A CONFIG FILE
#=================================================
#ynh_script_progression --message="Updating a configuration file..."
# Set permissions to app files
#ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies"
#chmod +x "/usr/bin/convert_movies"
#=================================================
# SETUP SYSTEMD
#=================================================
ynh_script_progression --message="Upgrading systemd configuration..." --weight=3
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config ynh_add_systemd_config
#=================================================
# GENERIC FINALIZATION
#=================================================
# INTEGRATE SERVICE IN YUNOHOST
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=3
yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log" yunohost service add $app --description="Streama media system" --log="/var/log/$app/$app.log"
#================================================= #=================================================