1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/jupyterlab_ynh.git synced 2024-09-03 19:26:35 +02:00

Merge pull request #80 from YunoHost-Apps/patch

Cleaning up
This commit is contained in:
Éric Gaspar 2021-03-16 17:41:56 +01:00 committed by GitHub
commit 149b4f5336
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 11 additions and 31 deletions

View file

@ -28,7 +28,7 @@ How to configure this app: by an admin panel, a plain file with SSH.
## Documentation
* Official documentation: https://jupyterlab.readthedocs.io/en/stable/
* YunoHost documentation: https://yunohost.org/#/app_jupyterlab
* YunoHost documentation: https://yunohost.org/en/app_jupyterlab
## YunoHost specific features

View file

@ -28,7 +28,7 @@ Comment configurer cette application : via le panneau d'administration, un fichi
## Documentation
* Documentation officielle : https://jupyterlab.readthedocs.io/en/stable/
* Documentation YunoHost : https://yunohost.org/#/app_jupyterlab_fr
* Documentation YunoHost : https://yunohost.org/fr/app_jupyterlab
## Caractéristiques spécifiques YunoHost

View file

@ -6,7 +6,7 @@
"en": "Code console environment for running Python code interactively.",
"fr": "Console de code pour exécuter du code Python de manière interactive."
},
"version": "3.0.10~ynh1",
"version": "3.0.10~ynh2",
"url": "https://jupyterlab.readthedocs.io/en/stable/",
"license": "BSD-3-Clause",
"maintainer": {
@ -14,7 +14,7 @@
"email": "pierre@kayou.io"
},
"requirements": {
"yunohost": ">= 3.8.1"
"yunohost": ">= 4.1.7"
},
"multi_instance": true,
"services": [
@ -25,38 +25,22 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for JupyterLab",
"fr": "Choisissez un nom de domaine pour JupyterLab"
},
"example": "example.com"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for JupyterLab",
"fr": "Choisissez un chemin pour JupyterLab"
},
"example": "/jupyterlab",
"default": "/jupyterlab"
},
{
"name": "admin",
"type": "user",
"ask": {
"en": "Choose an admin user",
"fr": "Choisissez ladministrateur"
},
"example": "johndoe"
},
{
"name": "is_public",
"type": "boolean",
"ask": {
"en": "Is it a public application?",
"fr": "Est-ce une application publique ?"
},
"default": true
},
{

View file

@ -50,7 +50,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=admin --value=$admin
ynh_app_setting_set --app=$app --key=is_public --value=$is_public
ynh_app_setting_set --app=$app --key=enable_terminal --value=$enable_terminal
#=================================================

View file

@ -19,7 +19,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)
admin=$(ynh_app_setting_get --app=$app --key=admin)
is_public=$(ynh_app_setting_get --app=$app --key=is_public)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
port=$(ynh_app_setting_get --app=$app --key=port)
port_hub=$(ynh_app_setting_get --app=$app --key=port_hub)
@ -37,15 +36,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=/opt/$app
@ -55,6 +45,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
#=================================================