1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/minchat_ynh.git synced 2024-09-03 19:36:29 +02:00

Fix linter

This commit is contained in:
ericgaspar 2021-03-10 22:17:04 +01:00
parent 8c194ada9d
commit 5149c90107
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 13 additions and 9 deletions

View file

@ -14,5 +14,4 @@
upgrade=1
backup_restore=1
multi_instance=1
incorrect_path=1
port_already_use=0

View file

@ -6,19 +6,19 @@
"en": "Minimalist web chat",
"fr": "Web chat minimaliste"
},
"version": "1.0~ynh2",
"version": "1.0~ynh3",
"url": "https://github.com/wojtek77/chat",
"license": "MIT",
"maintainer": {
"name": "chtixof"
},
"requirements": {
"yunohost": ">> 3.8.1"
"yunohost": ">> 4.1.7"
},
"multi_instance": true,
"services": [
"nginx",
"php7.0-fpm"
"php7.3-fpm"
],
"arguments": {
"install" : [

View file

@ -47,7 +47,6 @@ ynh_script_progression --message="Storing installation settings..." --weight=1
ynh_app_setting_set --app=$app --key=domain --value=$domain
ynh_app_setting_set --app=$app --key=path --value=$path_url
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
@ -79,7 +78,7 @@ ynh_system_user_create --username=$app
#=================================================
ynh_script_progression --message="Configuring PHP-FPM..." --weight=1
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION
ynh_add_fpm_config
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#=================================================
@ -94,12 +93,12 @@ chown -R $app: $final_path
#=================================================
# SETUP SSOWAT
#=================================================
ynh_script_progression --message="Configuring SSOwat..." --weight=3
ynh_script_progression --message="Configuring permissions..." --weight=3
# Make app public if necessary or protect it
if [ $is_public -eq 1 ]
then
ynh_permission_update --permission "main" --add "visitors"
ynh_permission_update --permission="main" --add="visitors"
fi
#=================================================

View file

@ -18,7 +18,6 @@ app=$YNH_APP_INSTANCE_NAME
domain=$(ynh_app_setting_get --app=$app --key=domain)
path_url=$(ynh_app_setting_get --app=$app --key=path)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
@ -47,6 +46,13 @@ if [ -z "$final_path" ]; then
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
#=================================================