diff --git a/check_process b/check_process index 9dc103e..0658fdd 100644 --- a/check_process +++ b/check_process @@ -13,14 +13,9 @@ upgrade=1 from_commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80 backup_restore=1 multi_instance=1 - wrong_user=1 - wrong_path=1 port_already_use=0 change_url=1 - ;;; Levels - # If the level 5 (Package linter) is forced to 1. Please add justifications here. - Level 5=auto - ;;; Upgrade options - ; commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80 - name=Upgrade to upstream version 2018-04-06 - manifest_arg=domain=DOMAIN&path=PATH& +;;; Upgrade options + ; commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80 + name=Upgrade to upstream version 2018-04-06 + manifest_arg=domain=DOMAIN&path=PATH& diff --git a/conf/nginx.conf b/conf/nginx.conf index 37de41d..556b622 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,7 +9,6 @@ location __PATH__/ { rewrite ^ https://$server_name$request_uri? permanent; } -### Example PHP configuration (remove it if not used) index index.php; # Common parameter to increase upload size limit in conjunction with dedicated php-fpm file @@ -26,7 +25,6 @@ location __PATH__/ { fastcgi_param PATH_INFO $fastcgi_path_info; fastcgi_param SCRIPT_FILENAME $request_filename; } -### End of PHP configuration part # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/manifest.json b/manifest.json index b62f087..076999c 100644 --- a/manifest.json +++ b/manifest.json @@ -15,11 +15,11 @@ }, "multi_instance": true, "requirements": { - "yunohost": ">= 3.7" + "yunohost": ">= 4.0.0" }, "services": [ "nginx", - "php7.0-fpm", + "php7.3-fpm", "mysql" ], "arguments": { diff --git a/scripts/change_url b/scripts/change_url index 9eae8dd..d6c6747 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -99,6 +99,7 @@ fi # RELOAD NGINX #================================================= ynh_script_progression --message="Reloading NGINX web server..." --weight=1 + ynh_systemd_action --service_name=nginx --action=reload #================================================= diff --git a/scripts/install b/scripts/install index 190df5a..b5b54bb 100644 --- a/scripts/install +++ b/scripts/install @@ -88,8 +88,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= # SPECIFIC SETUP #================================================= - ynh_script_progression --message="Configuring RSS-Bridge..." --weight=1 + # Enable every bridge for i in $final_path/bridges/*.php ; do echo $(basename $i) | sed "s|Bridge.php$||g" | tee -a $final_path/whitelist.txt @@ -108,10 +108,13 @@ chown -R $app: $final_path/cache #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." --weight=1 +ynh_script_progression --message="Configuring permissions..." --weight=1 -# unprotected_uris allows SSO credentials to be passed anyway. -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" +# Make app public if necessary +if [ $is_public -eq 1 ] +then + ynh_permission_update --permission="main" --add="visitors" +fi #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 5a998de..e5813e1 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -27,6 +27,18 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) 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 #================================================= @@ -41,13 +53,6 @@ ynh_clean_setup () { # Exit if an error occurs during the execution of the script ynh_abort_if_errors -#================================================= -# CHECK THE PATH -#================================================= - -# Normalize the URL path syntax -path_url=$(ynh_normalize_url_path --path_url=$path_url) - #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -102,14 +107,6 @@ done chown -R root: $final_path chown -R $app: $final_path/cache -#================================================= -# SETUP SSOWAT -#================================================= -ynh_script_progression --message="Upgrading SSOwat configuration..." --weight=1 - -# unprotected_uris allows SSO credentials to be passed anyway -ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" - #================================================= # RELOAD NGINX #=================================================