diff --git a/README.md b/README.md index e5ffe36..2264711 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in A DLNA, UPnP and HTTP(S) Media Server -**Shipped version:** 10.15.0 +**Shipped version:** 10.16.0 diff --git a/README_fr.md b/README_fr.md index f95c50e..6ae2acd 100644 --- a/README_fr.md +++ b/README_fr.md @@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour Un Serveur Multimedia DLNA, UPnP et HTTP(S) -**Version incluse :** 10.15.0 +**Version incluse :** 10.16.0 diff --git a/check_process b/check_process index fad2e24..5d3f417 100644 --- a/check_process +++ b/check_process @@ -13,7 +13,7 @@ setup_private=1 setup_public=1 upgrade=1 - upgrade=1 from_commit=0bdac48b6ee51cbfd687a1e3a693f105f79185b6 + upgrade=1 from_commit=e163e711145f6dd5674e25ba378c6807d3a4f748 backup_restore=1 multi_instance=0 port_already_use=1 diff --git a/conf/nginx.conf b/conf/nginx.conf index 1b15548..c0399a3 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -13,10 +13,6 @@ location __PATH__/ { proxy_pass http://localhost:__PORT_WEB__/; proxy_set_header Host $host; - # Force usage of https - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/manifest.json b/manifest.json index 47e24cc..e08796b 100644 --- a/manifest.json +++ b/manifest.json @@ -6,10 +6,10 @@ "en": "A DLNA, UPnP and HTTP(S) Media Server", "fr": "Un Serveur Multimedia DLNA, UPnP et HTTP(S)" }, - "version": "10.15.0~ynh1", + "version": "10.16.0~ynh1", "url": "www.universalmediaserver.com", "upstream": { - "version": "10.15.0", + "version": "10.16.0", "license": "GPL-2.0-or-later", "website": "www.universalmediaserver.com", "admindoc": "https://github.com/UniversalMediaServer/UniversalMediaServer/wiki", @@ -32,7 +32,6 @@ { "name": "domain", "type": "domain", - "example": "example.com", "help": { "en": "UMS require its own subdomain", "fr": "UMS a besoin de son propre sous-domaine" diff --git a/scripts/_common.sh b/scripts/_common.sh index 16c9386..a70a27a 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,11 +9,11 @@ pkg_dependencies="mediainfo dcraw p7zip" mach=`uname -m` -sha256_arm64=0480572e9cb5c4aae8fddc9cea1402d7e0466a98dab4b19fe32a660a543fbf4d -sha256_armel=fbb7e56abaf3bbf55457d46d5f72843a039b039ffe5a886fce1b91c0f01c6d6e -sha256_armhf=a14163ee429b8762d477d4845859d6bf5a1ff3b77cf64f5fffc65e170e701206 -sha256_x86_64=664c4f006fc66f82aaef67186d4c77b2d2c581c8756c56579397a7a6fc938d2f -sha256_x86=7e7fffe1d3ea345ef9d60a9fdb0cb38978ce8739ebffd8b0b7d799be58cfbc40 +sha256_arm64=9bfbb42c68bf4fcdaaa37ab442bab42a56075b70d9092fbd4062c0f2d75fc570 +sha256_armel=7ac0048d9908afdb66b724dc571b7fbdbfd0cb18d18248a5667ca066ecd1515f +sha256_armhf=70c3b834140816837c102541e3025b01795ff0d530ae82d21e308d2dc140bc08 +sha256_x86_64=dd0aa1347dc223b83b647efc8004752624a187af937f838441fc259dd8d98077 +sha256_x86=c7d948d2245f306f95661808cb279563ac792d68f04b33c54f35c2d47d73ed49 case "$mach" in "armv6l" ) mach="armel" diff --git a/scripts/backup b/scripts/backup index b9558d8..5b86015 100755 --- a/scripts/backup +++ b/scripts/backup @@ -76,7 +76,7 @@ ynh_backup --src_path="/etc/systemd/system/$app.service" # BACKUP VARIOUS FILES #================================================= -ynh_backup --src_path="/home/$app/" +ynh_backup --src_path="/home/yunohost.app/$app/" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index ecb56bf..c0bafb2 100755 --- a/scripts/install +++ b/scripts/install @@ -86,7 +86,7 @@ ynh_script_progression --message="Configuring system user..." --weight=1 # Create a system user #UMS require a home path for the user as config files are stored in there -ynh_system_user_create --username=$app --home_dir=/home/$app +ynh_system_user_create --username=$app --home_dir=/home/yunohost.app/$app #================================================= #SETTING MULTIMEDIA DIRECTORY @@ -141,13 +141,13 @@ ynh_add_systemd_config ynh_script_progression --message="Setting up configuration file.." --weight=5 #UMS read config file from .config/UMS folder -mkdir -p "/home/$app/.config/UMS" -ynh_add_config --template="UMS.conf.default" --destination="/home/$app/.config/UMS/UMS.conf" -ynh_add_config --template="WEB.conf.default" --destination="/home/$app/.config/UMS/WEB.conf" -ynh_add_config --template="VirtualFolders.conf.default" --destination="/home/$app/.config/UMS/VirtualFolders.conf" -chown -R $app:$app "/home/$app/.config" -chmod -R 700 "/home/$app/.config" -#chmod 600 "/home/$app/.config/UMS/*" +mkdir -p "/home/yunohost.app/$app/.config/UMS" +ynh_add_config --template="UMS.conf.default" --destination="/home/yunohost.app/$app/.config/UMS/UMS.conf" +ynh_add_config --template="WEB.conf.default" --destination="/home/yunohost.app/$app/.config/UMS/WEB.conf" +ynh_add_config --template="VirtualFolders.conf.default" --destination="/home/yunohost.app/$app/.config/UMS/VirtualFolders.conf" +chown -R $app:$app "/home/yunohost.app/$app/.config" +chmod -R 700 "/home/yunohost.app/$app/.config" +#chmod 600 "/home/yunohost.app/$app/.config/UMS/*" #================================================= # GENERIC FINALIZATION diff --git a/scripts/remove b/scripts/remove index 8813393..4156943 100755 --- a/scripts/remove +++ b/scripts/remove @@ -108,7 +108,7 @@ ynh_script_progression --message="Removing the dedicated system user..." --weigh # Delete a system user ynh_system_user_delete --username=$app -ynh_secure_remove --file="/home/$app" +ynh_secure_remove --file="/home/yunohost.app/$app" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 40ecfa4..2c77c03 100755 --- a/scripts/restore +++ b/scripts/restore @@ -68,7 +68,7 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei # Create the dedicated user (if not existing) #UMS require a home path for the user as config files are stored in there -ynh_system_user_create --username=$app --home_dir=/home/$app +ynh_system_user_create --username=$app --home_dir=/home/yunohost.app/$app #================================================= #SETTING MULTIMEDIA DIRECTORY @@ -125,9 +125,9 @@ yunohost service add $app --description="A DLNA, UPnP and HTTP(S) Media Server." # RESTORE VARIOUS FILES #================================================= mkdir -p /var/log/$app -ynh_restore_file --origin_path="/home/$app/" -chown -R $app:$app "/home/$app/.config" -chmod -R 700 "/home/$app/.config" +ynh_restore_file --origin_path="/home/yunohost.app/$app/" +chown -R $app:$app "/home/yunohost.app/$app/.config" +chmod -R 700 "/home/yunohost.app/$app/.config" #================================================= # RESTORE THE LOGROTATE CONFIGURATION diff --git a/scripts/upgrade b/scripts/upgrade index 9f7e915..bcd85fc 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -29,12 +29,6 @@ upstream_version=$(ynh_app_upstream_version) upgrade_type=$(ynh_check_app_version_changed) -#================================================= -# ENSURE DOWNWARD COMPATIBILITY -#================================================= -ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 - - #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -49,6 +43,19 @@ 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 + +#move home folder from previous /home/app to /home/yunohost.app/$app +#has to be after backup, otherwise backup will not find home folder and will fail +if [ ! $(getent passwd $app | cut -d: -f6 | grep yunohost.app) ] +then + ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log" + usermod -m -d /home/yunohost.app/$app $app +fi + #================================================= # STANDARD UPGRADE STEPS #================================================= @@ -94,7 +101,7 @@ ynh_install_app_dependencies $pkg_dependencies ynh_script_progression --message="Making sure dedicated system user exists..." --weight=1 # Create a dedicated user (if not existing) -ynh_system_user_create --username=$app --home_dir=/home/$app +ynh_system_user_create --username=$app --home_dir=/home/yunohost.app/$app #================================================= # SPECIFIC UPGRADE