diff --git a/README.md b/README.md index da34ff8..5c39777 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in ## 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.9.2 +**Shipped version:** 1.9.3 ## Screenshots diff --git a/README_fr.md b/README_fr.md index b4eebc8..f1c3180 100644 --- a/README_fr.md +++ b/README_fr.md @@ -11,7 +11,7 @@ Si vous n'avez pas YunoHost, consultez [le guide](https://yunohost.org/#/install ## 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.9.2 +**Version incluse :** 1.9.3 ## Captures d'écran @@ -21,7 +21,7 @@ Streama est un serveur de streaming multimédia auto-hébergé gratuit fonctionn * [Démo officielle](https://streama.demo-version.net) -**Nom d’utilisateur** : demoUser +**Nom d’utilisateur** : demoUser **Mot de passe** : demoUser ## Guide d’installation diff --git a/check_process b/check_process index ccb5ae4..eb0f54f 100644 --- a/check_process +++ b/check_process @@ -24,3 +24,8 @@ ;;; Options Email= Notification=none +;;; Upgrade options + ; commit= + name= + manifest_arg=domain=DOMAIN&path=PATH&admin=USER&language=fr&is_public=1&password=pass&port=666& + diff --git a/conf/app.src b/conf/app.src index 889d28c..79ea116 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/streamaserver/streama/releases/download/v1.9.2/streama-1.9.2.jar -SOURCE_SUM=86362d9f61b85846a23aaafbfbe2746bb6fb25f9c459e8739337c8dbd128a786 +SOURCE_URL=https://github.com/streamaserver/streama/releases/download/v1.9.3/streama-1.9.3.jar +SOURCE_SUM=efe96bc52413cada7653459fa3fb6c45a918da86338883ac04ceb844bb9223f1 SOURCE_SUM_PRG=sha256sum SOURCE_FORMAT=jar SOURCE_IN_SUBDIR=false diff --git a/manifest.json b/manifest.json index 7dc4600..d1a4576 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Self hosted streaming media server", "fr": "Serveur de streaming auto-hébergé" }, - "version": "1.9.2~ynh3", + "version": "1.9.3~ynh1", "url": "https://streamaserver.org/", "license": "MIT", "maintainer": { diff --git a/scripts/install b/scripts/install index 8b5cd00..13000ea 100644 --- a/scripts/install +++ b/scripts/install @@ -95,6 +95,7 @@ ynh_system_user_create --username=$app #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=1 +# This can be removed as the variable is dynamically replaced by ynh_add_systemd_config helper ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/systemd.service" ynh_add_systemd_config @@ -138,14 +139,12 @@ ynh_systemd_action --service_name=$app --action=start --log_path="systemd" --lin #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 # Make app public if necessary or protect it if [ $is_public -eq 1 ] then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. - ynh_permission_update --permission "main" --add "visitors" + ynh_permission_update --permission="main" --add="visitors" fi #================================================= diff --git a/scripts/remove b/scripts/remove index f9e4de5..bf512bb 100644 --- a/scripts/remove +++ b/scripts/remove @@ -16,9 +16,9 @@ ynh_script_progression --message="Loading installation settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get "$app" domain) -port=$(ynh_app_setting_get "$app" port) -final_path=$(ynh_app_setting_get "$app" final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +port=$(ynh_app_setting_get --app=$app --key=port) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # STANDARD REMOVE @@ -26,7 +26,7 @@ final_path=$(ynh_app_setting_get "$app" final_path) # REMOVE SERVICE FROM ADMIN PANEL #================================================= -# 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 then ynh_script_progression --message="Removing Streama service integration..." --weight=1 diff --git a/scripts/restore b/scripts/restore index f52eb04..d4e9ea2 100644 --- a/scripts/restore +++ b/scripts/restore @@ -26,9 +26,9 @@ ynh_script_progression --message="Loading settings..." --weight=1 app=$YNH_APP_INSTANCE_NAME -domain=$(ynh_app_setting_get --app="$app" --key=domain) -path_url=$(ynh_app_setting_get --app="$app" --key=path) -final_path=$(ynh_app_setting_get --app="$app" --key=final_path) +domain=$(ynh_app_setting_get --app=$app --key=domain) +path_url=$(ynh_app_setting_get --app=$app --key=path) +final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= # CHECK IF THE APP CAN BE RESTORED diff --git a/scripts/upgrade b/scripts/upgrade index c47b32a..fda1166 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,23 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) is_public=$(ynh_app_setting_get --app=$app --key=is_public) port=$(ynh_app_setting_get --app=$app --key=port) +#================================================= +# CHECK VERSION +#================================================= + +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 #================================================= @@ -44,7 +61,7 @@ ynh_abort_if_errors #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=20 -ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" +ynh_systemd_action --service_name=$app --action=stop --log_path="/var/log/$app/$app.log" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -75,6 +92,7 @@ ynh_install_app_dependencies $pkg_dependencies #================================================= ynh_script_progression --message="Configuring a systemd service..." --weight=3 +# This can be removed as the variable is dynamically replaced by ynh_add_systemd_config helper ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/systemd.service" ynh_add_systemd_config @@ -87,7 +105,6 @@ 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 -a "../conf/convert.sh" /usr/bin/convert_movies #=================================================