diff --git a/README.md b/README.md index a2d2357..ce032ad 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ + + # Streama for YunoHost [![Integration level](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) @@ -5,24 +10,22 @@ *[Lire ce readme en français.](./README_fr.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.* ## Overview -Streama is a free self hosted media streaming server running on Java, that you can install on your Linux distribution. Its features are similar to those of Kodi and Plex and it is simply a matter of personal choice which one you would like to use. -**Shipped version:** 1.10.3 +Self hosted streaming media server + +**Shipped version:** 1.10.3~ynh2 + +**Demo:** https://streama.demo-version.net ## Screenshots -![](https://user-images.githubusercontent.com/51749973/96721577-9f216280-13ac-11eb-935c-d083f4b010a2.jpg) +![](./doc/screenshots/screenshot.jpg) -## Demo - -* [Official demo](https://streama.demo-version.net) - -**User**: demoUser -**Password**: demoUser +## Disclaimers / important information ## Installation guide @@ -32,22 +35,6 @@ Default upload directory is: `/home/yunohost.app/streama` (must be mentioned in Default local video directory is: `/home/yunohost.app/streama/upload` (must be mentioned in *Settings* page or can be changed) -## Documentation - - * Official documentation: https://docs.streama-project.com/ or https://github.com/streamaserver/streama/wiki - -#### Multi-user support - -* Are LDAP and HTTP auth supported? **No** -* Can the app be used by multiple users? **Yes** - -#### Supported architectures - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/streama.svg)](https://ci-apps.yunohost.org/ci/apps/streama/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/streama.svg)](https://ci-apps-arm.yunohost.org/ci/apps/streama/) - -## Limitations - ## Additional information * After install: @@ -80,14 +67,13 @@ This can be changed in settings. $ sudo dpkg -i libaften-dev_0.0.8svn20100103-dmo2_amd64.deb $ bash bootStrap.bash --deb --without-qt --with-cli -## Links +## Documentation and resources - * Report a bug: https://github.com/YunoHost-Apps/streama_ynh/issues - * App website: https://docs.streama-project.com/ - * Upstream app repository: https://github.com/streamaserver/streama - * YunoHost website: https://yunohost.org/ - ---- +* Official app website: https://docs.streama-project.com +* Official admin documentation: https://docs.streama-project.com/ +* Upstream app code repository: https://github.com/streamaserver/streama +* YunoHost documentation for this app: https://yunohost.org/app_streama +* Report a bug: https://github.com/YunoHost-Apps/streama_ynh/issues ## Developer info @@ -99,3 +85,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/streama_ynh/tree/test or sudo yunohost app upgrade streama -u https://github.com/YunoHost-Apps/streama_ynh/tree/testing --debug ``` + +**More info regarding app packaging:** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/README_fr.md b/README_fr.md index e361caa..bc7eb8b 100644 --- a/README_fr.md +++ b/README_fr.md @@ -1,28 +1,27 @@ # Streama pour YunoHost -[![Integration level](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) -[![Install Streama with YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=streama) +[![Niveau d'intégration](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) +[![Installer Streama avec YunoHost](https://install-app.yunohost.org/install-with-yunohost.svg)](https://install-app.yunohost.org/?app=streama) -*[Read this readme in english.](./README.md)* +*[Read this readme in english.](./README.md)* +*[Lire ce readme en français.](./README_fr.md)* -> *Ce package vous permet d'installer Streama rapidement et simplement sur un serveur YunoHost. -Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install) pour apprendre comment l'installer.* +> *Ce package vous permet d'installer Streama rapidement et simplement sur un serveur YunoHost. +Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour savoir comment l'installer et en profiter.* ## Vue d'ensemble -Streama est un serveur de streaming multimédia auto-hébergé gratuit fonctionnant sur Java, que vous pouvez installer sur votre distribution Linux. Ses fonctionnalités sont similaires à celles de Kodi et Plex et c'est simplement une question de choix personnel que vous souhaitez utiliser. -**Version incluse :** 1.10.3 +Serveur de streaming auto-hébergé + +**Version incluse :** 1.10.3~ynh2 + +**Démo :** https://streama.demo-version.net ## Captures d'écran -![](https://user-images.githubusercontent.com/51749973/96721577-9f216280-13ac-11eb-935c-d083f4b010a2.jpg) +![](./doc/screenshots/screenshot.jpg) -## Démo - -* [Démo officielle](https://streama.demo-version.net) - -**Nom d’utilisateur** : demoUser -**Mot de passe** : demoUser +## Avertissements / informations importantes ## Guide d’installation @@ -32,22 +31,6 @@ Le répertoire de téléchargement par défaut est : `/home/yunohost.app/streama Le répertoire vidéo local par défaut est : `/home/yunohost.app/streama/upload` (doit être mentionné dans la page *Paramètres* ou peut être modifié) -## Documentation - - * Documentation officielle : https://docs.streama-project.com/ ou https://github.com/streamaserver/streama/wiki - -#### Support multi-utilisateur - -* L'authentification LDAP et HTTP est-elle prise en charge ? **Non** -* L'application peut-elle être utilisée par plusieurs utilisateurs ? **Oui** - -#### Architectures supportées - -* x86-64 - [![Build Status](https://ci-apps.yunohost.org/ci/logs/streama.svg)](https://ci-apps.yunohost.org/ci/apps/streama/) -* ARMv8-A - [![Build Status](https://ci-apps-arm.yunohost.org/ci/logs/streama.svg)](https://ci-apps-arm.yunohost.org/ci/apps/streama/) - -## Limitations - ## Informations additionnelles * Après l’installation : @@ -80,14 +63,13 @@ Ceci pourra être changé dans les paramètres. $ sudo dpkg -i libaften-dev_0.0.8svn20100103-dmo2_amd64.deb $ bash bootStrap.bash --deb --without-qt --with-cli -## Liens +## Documentations et ressources - * Signaler un bug : https://github.com/YunoHost-Apps/streama_ynh/issues - * Site de l'application : https://docs.streama-project.com/ - * Dépôt de l'application principale : https://github.com/streamaserver/streama - * Site web YunoHost : https://yunohost.org/ - ---- +* Site officiel de l'app : https://docs.streama-project.com +* Documentation officielle de l'admin : https://docs.streama-project.com/ +* Dépôt de code officiel de l'app : https://github.com/streamaserver/streama +* Documentation YunoHost pour cette app : https://yunohost.org/app_streama +* Signaler un bug : https://github.com/YunoHost-Apps/streama_ynh/issues ## Informations pour les développeurs @@ -99,3 +81,5 @@ sudo yunohost app install https://github.com/YunoHost-Apps/streama_ynh/tree/test ou sudo yunohost app upgrade streama -u https://github.com/YunoHost-Apps/streama_ynh/tree/testing --debug ``` + +**Plus d'infos sur le packaging d'applications :** https://yunohost.org/packaging_apps \ No newline at end of file diff --git a/check_process b/check_process index a0e9182..4c01865 100644 --- a/check_process +++ b/check_process @@ -3,7 +3,7 @@ domain="domain.tld" path="/" is_public=1 - port="9980" (PORT) + port="9980"= ; Checks pkg_linter=1 setup_sub_dir=1 @@ -15,7 +15,6 @@ upgrade=1 from_commit=3a02114f50e785722bc592cbcc33f92bf070b1c1 backup_restore=1 multi_instance=0 - port_already_use=0 change_url=0 ;;; Options Email= diff --git a/doc/DISCLAIMER.md b/doc/DISCLAIMER.md index 5e0fbac..292fe72 100644 --- a/doc/DISCLAIMER.md +++ b/doc/DISCLAIMER.md @@ -1,3 +1,5 @@ +## Disclaimers / important information + ## Installation guide > :warning: Streama must be installed in the root domain or subdomain. @@ -5,3 +7,35 @@ Default upload directory is: `/home/yunohost.app/streama` (must be mentioned in *Settings* page or can be changed) Default local video directory is: `/home/yunohost.app/streama/upload` (must be mentioned in *Settings* page or can be changed) + +## Additional information + +* After install: + - **Username**: admin + - **Password**: admin + +This can be changed in settings. + +### Convert video: + + $ convert_movies -ffmpeg + $ convert_movies -avidemux + $ convert_movies -mencoder + $ convert_movies -avconv + +### Avidemux compilation: + + $ git clone https://github.com/mean00/avidemux2/ + $ cd avidemux2 + $ sudo apt-get install build-essential cmake \ + pkg-config yasm libsqlite3-dev libfontconfig1-dev \ + libfribidi-dev libxvdev libvdpau-dev libva-dev \ + libasound2-dev libpulse-dev libfdk-aac-dev \ + libpng-dev libmp3lame-dev libx264-dev \ + libxvidcore-dev libfaad-dev libfaac-dev libopus-dev \ + libvorbis-dev libogg-dev libdca-dev libx265-dev + $ wget https://www.deb-multimedia.org/pool/main/a/aften/libaften0_0.0.8svn20100103-dmo2_amd64.deb + $ wget https://www.deb-multimedia.org/pool/main/a/aften/libaften-dev_0.0.8svn20100103-dmo2_amd64.deb + $ sudo dpkg -i libaften0_0.0.8svn20100103-dmo2_amd64.deb + $ sudo dpkg -i libaften-dev_0.0.8svn20100103-dmo2_amd64.deb + $ bash bootStrap.bash --deb --without-qt --with-cli diff --git a/doc/DISCLAIMER_fr.md b/doc/DISCLAIMER_fr.md index e2d1bdd..1e9a61d 100644 --- a/doc/DISCLAIMER_fr.md +++ b/doc/DISCLAIMER_fr.md @@ -1,7 +1,31 @@ -## Guide d’installation +## Informations additionnelles -> :warning: Streama doit être installé dans le domaine racine ou un sous-domaine dédié. +* Après l’installation : + - **Nom d’utilisateur** : admin + - **Mot de passe** : admin -Le répertoire de téléchargement par défaut est : `/home/yunohost.app/streama` (doit être mentionné dans la page *Paramètres* ou peut être modifié) +Ceci pourra être changé dans les paramètres. + +### Convertir des vidéos : -Le répertoire vidéo local par défaut est : `/home/yunohost.app/streama/upload` (doit être mentionné dans la page *Paramètres* ou peut être modifié) + $ convert_movies -ffmpeg + $ convert_movies -avidemux + $ convert_movies -mencoder + $ convert_movies -avconv + +### Compilation avidemux : + + $ git clone https://github.com/mean00/avidemux2/ + $ cd avidemux2 + $ sudo apt-get install build-essential cmake \ + pkg-config yasm libsqlite3-dev libfontconfig1-dev \ + libfribidi-dev libxvdev libvdpau-dev libva-dev \ + libasound2-dev libpulse-dev libfdk-aac-dev \ + libpng-dev libmp3lame-dev libx264-dev \ + libxvidcore-dev libfaad-dev libfaac-dev libopus-dev \ + libvorbis-dev libogg-dev libdca-dev libx265-dev + $ wget https://www.deb-multimedia.org/pool/main/a/aften/libaften0_0.0.8svn20100103-dmo2_amd64.deb + $ wget https://www.deb-multimedia.org/pool/main/a/aften/libaften-dev_0.0.8svn20100103-dmo2_amd64.deb + $ sudo dpkg -i libaften0_0.0.8svn20100103-dmo2_amd64.deb + $ sudo dpkg -i libaften-dev_0.0.8svn20100103-dmo2_amd64.deb + $ bash bootStrap.bash --deb --without-qt --with-cli diff --git a/doc/screenshots/screenshot.jpg b/doc/screenshots/screenshot.jpg new file mode 100644 index 0000000..527d42b Binary files /dev/null and b/doc/screenshots/screenshot.jpg differ diff --git a/manifest.json b/manifest.json index ff0f364..1d38d07 100644 --- a/manifest.json +++ b/manifest.json @@ -7,13 +7,12 @@ "fr": "Serveur de streaming auto-hébergé" }, "version": "1.10.3~ynh2", - "url": "https://streamaserver.org/", + "url": "https://docs.streama-project.com", "upstream": { "license": "MIT", - "website": "https://streamaserver.org/", + "website": "https://docs.streama-project.com", "demo": "https://streama.demo-version.net", "admindoc": "https://docs.streama-project.com/", - "userdoc": "https://yunohost.org/apps", "code": "https://github.com/streamaserver/streama" }, "license": "MIT", diff --git a/scripts/install b/scripts/install index f3c99bf..7ad3a38 100644 --- a/scripts/install +++ b/scripts/install @@ -81,6 +81,11 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" +chmod +x $final_path/streama.jar + #================================================= # NGINX CONFIGURATION #================================================= @@ -105,17 +110,8 @@ ynh_add_systemd_config # Set permissions to app files mkdir -p $final_path/data/streama ln -s $final_path/data/streama /home/yunohost.app/streama -cp "../conf/convert.sh" /usr/bin/convert_movies - -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -chown -R $app: $final_path -chmod +x /usr/bin/convert_movies -chmod +x $final_path/streama.jar +ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies" +chmod +x "/usr/bin/convert_movies" #================================================= # INTEGRATE SERVICE IN YUNOHOST diff --git a/scripts/restore b/scripts/restore index 34e3457..ea11593 100644 --- a/scripts/restore +++ b/scripts/restore @@ -63,6 +63,10 @@ ynh_script_progression --message="Restoring Streama main directory..." --weight= ynh_restore_file --origin_path="$final_path" +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" + #================================================= # INSTALL DEPENDENCIES #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 7a45d61..9987213 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,17 +28,6 @@ port=$(ynh_app_setting_get --app=$app --key=port) upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - -# Cleaning legacy permissions -if ynh_legacy_permissions_exists; then - ynh_legacy_permissions_delete_all - - ynh_app_setting_delete --app=$app --key=is_public -fi #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -53,6 +42,18 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors +#================================================= +# ENSURE DOWNWARD COMPATIBILITY +#================================================= +ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 + +# Cleaning legacy permissions +if ynh_legacy_permissions_exists; then + ynh_legacy_permissions_delete_all + + ynh_app_setting_delete --app=$app --key=is_public +fi + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -73,11 +74,19 @@ ynh_system_user_create --username=$app --home_dir="$final_path" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= -ynh_script_progression --message="Setting up source files..." --weight=3 -ynh_app_setting_set --app=$app --key=final_path --value=$final_path -# Download, check integrity, uncompress and patch the source from app.src -ynh_setup_source --dest_dir="$final_path" +if [ "$upgrade_type" == "UPGRADE_APP" ] +then + ynh_script_progression --message="Upgrading source files..." --weight=1 + + # Download, check integrity, uncompress and patch the source from app.src + ynh_setup_source --dest_dir="$final_path" +fi + +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" +chmod +x $final_path/streama.jar #================================================= # NGINX CONFIGURATION @@ -109,17 +118,8 @@ ynh_add_systemd_config # Set permissions to app files mkdir -p $final_path/data/streama -cp -a "../conf/convert.sh" /usr/bin/convert_movies - -#================================================= -# GENERIC FINALIZATION -#================================================= -# SECURE FILES AND DIRECTORIES -#================================================= - -chown -R $app: $final_path -chmod +x /usr/bin/convert_movies -chmod +x $final_path/streama.jar +ynh_add_config --template="../conf/convert.sh" --destination="/usr/bin/convert_movies" +chmod +x "/usr/bin/convert_movies" #================================================= # INTEGRATE SERVICE IN YUNOHOST