1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yourls_ynh.git synced 2024-09-03 20:35:59 +02:00

Add new permissions

This commit is contained in:
ericgaspar 2021-02-08 13:17:40 +01:00
parent ca8991cfdf
commit da7c12e02f
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 17 additions and 7 deletions

View file

@ -15,7 +15,7 @@
"url": ""
},
"requirements": {
"yunohost": ">= 3.8.1"
"yunohost": ">= 4.0.0"
},
"previous_maintainers": {
"name": "courgette",
@ -25,7 +25,7 @@
"multi_instance": true,
"services": [
"nginx",
"php7.0-fpm",
"php7.3-fpm",
"mysql"
],
"arguments": {

View file

@ -90,7 +90,7 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Configuring PHP-FPM..." --weight=2
# Create a dedicated php-fpm config
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
ynh_add_fpm_config --package="$extra_php_dependencies"
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
# copy index file
@ -117,10 +117,13 @@ ynh_store_file_checksum "$final_path/user/config.php"
chown -R $app: $final_path
# Reload Nginx and regenerate SSOwat conf
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring permissions..." --time --weight=1
# unprotected_uris allows SSO credentials to be passed anyway.
ynh_app_setting_set --app=$app --key=unprotected_uris --value="/"
ynh_permission_update --permission="main" --add="visitors"
#=================================================
# RELOAD NGINX

View file

@ -43,7 +43,6 @@ ynh_script_progression --message="Removing YOURLS main directory..." --weight=4
# Remove the app directory securely
ynh_secure_remove --file="$final_path"
#=================================================
# REMOVE NGINX CONFIGURATION
#=================================================

View file

@ -44,6 +44,14 @@ if [ -z "$final_path" ]; then
final_path=/var/www/$app
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
fi
# 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
#=================================================
@ -108,7 +116,7 @@ ynh_system_user_create --username=$app
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4
# Create a dedicated PHP-FPM config
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
ynh_add_fpm_config --package="$extra_php_dependencies"
#=================================================
# MODIFY A CONFIG FILE