1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/rss-bridge_ynh.git synced 2024-09-03 20:25:51 +02:00

Add new permissions

This commit is contained in:
ericgaspar 2021-02-26 08:57:55 +01:00
parent 9d7a7d6f50
commit 93900986cb
No known key found for this signature in database
GPG key ID: 574F281483054D44
6 changed files with 26 additions and 32 deletions

View file

@ -13,14 +13,9 @@
upgrade=1 from_commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80 upgrade=1 from_commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80
backup_restore=1 backup_restore=1
multi_instance=1 multi_instance=1
wrong_user=1
wrong_path=1
port_already_use=0 port_already_use=0
change_url=1 change_url=1
;;; Levels ;;; Upgrade options
# If the level 5 (Package linter) is forced to 1. Please add justifications here. ; commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80
Level 5=auto name=Upgrade to upstream version 2018-04-06
;;; Upgrade options manifest_arg=domain=DOMAIN&path=PATH&
; commit=7a99e018f12d91876c84efd04e0a4e7f178fdd80
name=Upgrade to upstream version 2018-04-06
manifest_arg=domain=DOMAIN&path=PATH&

View file

@ -9,7 +9,6 @@ location __PATH__/ {
rewrite ^ https://$server_name$request_uri? permanent; rewrite ^ https://$server_name$request_uri? permanent;
} }
### Example PHP configuration (remove it if not used)
index index.php; index index.php;
# Common parameter to increase upload size limit in conjunction with dedicated php-fpm file # 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 PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;
} }
### End of PHP configuration part
# Include SSOWAT user panel. # Include SSOWAT user panel.
include conf.d/yunohost_panel.conf.inc; include conf.d/yunohost_panel.conf.inc;

View file

@ -15,11 +15,11 @@
}, },
"multi_instance": true, "multi_instance": true,
"requirements": { "requirements": {
"yunohost": ">= 3.7" "yunohost": ">= 4.0.0"
}, },
"services": [ "services": [
"nginx", "nginx",
"php7.0-fpm", "php7.3-fpm",
"mysql" "mysql"
], ],
"arguments": { "arguments": {

View file

@ -99,6 +99,7 @@ fi
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading NGINX web server..." --weight=1 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

@ -88,8 +88,8 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# SPECIFIC SETUP # SPECIFIC SETUP
#================================================= #=================================================
ynh_script_progression --message="Configuring RSS-Bridge..." --weight=1 ynh_script_progression --message="Configuring RSS-Bridge..." --weight=1
# Enable every bridge # Enable every bridge
for i in $final_path/bridges/*.php ; do for i in $final_path/bridges/*.php ; do
echo $(basename $i) | sed "s|Bridge.php$||g" | tee -a $final_path/whitelist.txt 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 # 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. # Make app public if necessary
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/" if [ $is_public -eq 1 ]
then
ynh_permission_update --permission="main" --add="visitors"
fi
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX

View file

@ -27,6 +27,18 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
upgrade_type=$(ynh_check_app_version_changed) 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 # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP
#================================================= #=================================================
@ -41,13 +53,6 @@ ynh_clean_setup () {
# Exit if an error occurs during the execution of the script # Exit if an error occurs during the execution of the script
ynh_abort_if_errors 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 # DOWNLOAD, CHECK AND UNPACK SOURCE
#================================================= #=================================================
@ -102,14 +107,6 @@ done
chown -R root: $final_path chown -R root: $final_path
chown -R $app: $final_path/cache 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 # RELOAD NGINX
#================================================= #=================================================