diff --git a/README.md b/README.md index 9c674c6..7d87946 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ How to configure this app: by an admin panel. ## Documentation * Official documentation: https://thelounge.chat/docs - * YunoHost documentation: https://yunohost.org/#/app_thelounge + * YunoHost documentation: https://yunohost.org/en/app_thelounge ## YunoHost specific features diff --git a/README_fr.md b/README_fr.md index c717791..279c2e2 100644 --- a/README_fr.md +++ b/README_fr.md @@ -28,7 +28,7 @@ Comment configurer cette application : via le panneau d’administration. ## Documentation * Documentation officielle : https://thelounge.chat/docs - * Documentation YunoHost : https://yunohost.org/#/app_thelounge_fr + * Documentation YunoHost : https://yunohost.org/fr/app_thelounge ## Caractéristiques spécifiques YunoHost diff --git a/manifest.json b/manifest.json index 054b760..5f4915c 100644 --- a/manifest.json +++ b/manifest.json @@ -19,7 +19,7 @@ "email": "beudbeud@beudibox.fr" }, "requirements": { - "yunohost": ">= 3.8.1" + "yunohost": ">= 4.1.7" }, "multi_instance": false, "services": [ diff --git a/pull_request_template.md b/pull_request_template.md index f44dbc6..6c28fc5 100644 --- a/pull_request_template.md +++ b/pull_request_template.md @@ -13,6 +13,4 @@ ## Package_check results --- -*If you have access to [App Continuous Integration for packagers](https://yunohost.org/#/packaging_apps_ci) you can provide a link to the package_check results like below, replacing '-NUM-' in this link by the PR number and USERNAME by your username on the ci-apps-dev. Or you provide a screenshot or a pastebin of the results* - -[![Build Status](https://ci-apps-dev.yunohost.org/jenkins/job/thelounge_ynh%20PR-NUM-%20(USERNAME)/badge/icon)](https://ci-apps-dev.yunohost.org/jenkins/job/thelounge_ynh%20PR-NUM-%20(USERNAME)/) +* An automatic package_check will be launch at https://ci-apps-dev.yunohost.org/, when you add a specific comment to your Pull Request: "!testme", "!gogogadgetoci" or "By the power of systemd, I invoke The Great App CI to test this Pull Request!"* diff --git a/scripts/install b/scripts/install index dbaa8c6..1308341 100644 --- a/scripts/install +++ b/scripts/install @@ -47,7 +47,6 @@ ynh_script_progression --message="Storing installation settings..." 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 ynh_app_setting_set --app=$app --key=config_path --value=$config_path #================================================= @@ -106,12 +105,14 @@ ynh_script_progression --message="Modifying a config file..." mkdir -p $config_path -# Main config File -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.js" +# # Main config File +# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.js" -cp -a ../conf/config.js "$config_path" +# cp -a ../conf/config.js "$config_path" -ynh_store_file_checksum "$config_path/config.js" +# ynh_store_file_checksum "$config_path/config.js" + +ynh_add_config --template="../conf/config.js" --destination="$config_path" #================================================= # INSTALL THE LOUNGE @@ -129,8 +130,8 @@ popd #================================================= ynh_script_progression --message="Configuring a systemd service..." -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__NODE__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service" @@ -165,10 +166,10 @@ ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" --l #================================================= # SETUP SSOWAT #================================================= -ynh_script_progression --message="Configuring SSOwat..." +ynh_script_progression --message="Configuring permissions..." # Make app public if necessary or protect it -[ $is_public -eq 0 ] || ynh_permission_update --permission "main" --add "visitors" +[ $is_public -eq 0 ] || ynh_permission_update --permission="main" --add="visitors" #================================================= # RELOAD NGINX diff --git a/scripts/upgrade b/scripts/upgrade index 9ec59bc..30bc6e2 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -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) config_path=$(ynh_app_setting_get --app=$app --key=config_path) port=$(ynh_app_setting_get --app=$app --key=port) @@ -35,15 +34,6 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Ensuring downward compatibility..." -# Fix is_public as a boolean value -if [ "$is_public" = "Yes" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=1 - is_public=1 -elif [ "$is_public" = "No" ]; then - ynh_app_setting_set --app=$app --key=is_public --value=0 - is_public=0 -fi - # If final_path doesn't exist, create it if [ -z "$final_path" ]; then final_path=/var/www/$app @@ -56,6 +46,13 @@ if [ -z "$config_path" ]; then ynh_app_setting_set --app=$app --key=config_path --value=$config_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 #================================================= @@ -142,20 +139,22 @@ fi #================================================= ynh_script_progression --message="Modifying a config file..." -ynh_backup_if_checksum_is_different --file="$config_path" -# Main config File -ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.js" +# ynh_backup_if_checksum_is_different --file="$config_path" +# # Main config File +# ynh_replace_string --match_string="__PORT__" --replace_string="$port" --target_file="../conf/config.js" -cp -a ../conf/config.js "$config_path" -ynh_store_file_checksum "$config_path/config.js" +# cp -a ../conf/config.js "$config_path" +# ynh_store_file_checksum "$config_path/config.js" + +ynh_add_config --template="../conf/config.js" --destination="$config_path" #================================================= # SETUP SYSTEMD #================================================= ynh_script_progression --message="Upgrading systemd configuration..." -ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" -ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="../conf/systemd.service" +#ynh_replace_string --match_string="__FINALPATH__" --replace_string="$final_path" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__ENV_PATH__" --replace_string="$PATH" --target_file="../conf/systemd.service" ynh_replace_string --match_string="__NODE__" --replace_string="$nodejs_path" --target_file="../conf/systemd.service"