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 #4 from YunoHost-Apps/testing

Can enable or disable the terminal
This commit is contained in:
bourreP 2019-01-04 15:51:33 +01:00 committed by GitHub
commit 0caee9f218
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 66 additions and 39 deletions

View file

@ -329,7 +329,7 @@ c.NotebookApp.terminado_settings = {'shell_command': ['/bin/bash']}
# #
# Terminals may also be automatically disabled if the terminado package is not # Terminals may also be automatically disabled if the terminado package is not
# available. # available.
#c.NotebookApp.terminals_enabled = True c.NotebookApp.terminals_enabled = bool(__ENABLE_TERMINAL__)
## Token used for authenticating first-time connections to the server. ## Token used for authenticating first-time connections to the server.
# #

View file

@ -59,6 +59,15 @@
"fr": "Est-ce une application publique ?" "fr": "Est-ce une application publique ?"
}, },
"default": true "default": true
},
{
"name": "enable_terminal",
"type": "boolean",
"ask": {
"en": "Enable terminal in the lab?",
"fr": "Activer le terminal dans le lab ?"
},
"default": true
} }
] ]
} }

View file

@ -61,6 +61,8 @@ config_jupyter_notebook() {
# Jupyter notebook configuration # Jupyter notebook configuration
cp -f ../conf/jupyter_notebook_config.py $jupyter_notebook_conf_path cp -f ../conf/jupyter_notebook_config.py $jupyter_notebook_conf_path
ynh_replace_string "__ENABLE_TERMINAL__" "$enable_terminal" $jupyter_notebook_conf_path
ynh_store_file_checksum $jupyter_notebook_conf_path ynh_store_file_checksum $jupyter_notebook_conf_path
} }

View file

@ -31,7 +31,9 @@ app=$YNH_APP_INSTANCE_NAME
# LOAD SETTINGS # LOAD SETTINGS
#================================================= #=================================================
admin=$(ynh_app_setting_get "$app" admin)
port=$(ynh_app_setting_get "$app" port) port=$(ynh_app_setting_get "$app" port)
port_hub=$(ynh_app_setting_get "$app" port_hub)
#================================================= #=================================================
# CHECK PATHS SYNTAX # CHECK PATHS SYNTAX
@ -63,6 +65,12 @@ fi
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS
#=================================================
# STOP SERVICE
#=================================================
yunohost service stop jupyterlab
#================================================= #=================================================
# MODIFY URL IN NGINX # MODIFY URL IN NGINX
#================================================= #=================================================
@ -96,3 +104,9 @@ config_jupyterlab
#================================================= #=================================================
service nginx reload service nginx reload
#=================================================
# START SERVICE
#=================================================
yunohost service start jupyterlab

View file

@ -23,6 +23,7 @@ domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC is_public=$YNH_APP_ARG_IS_PUBLIC
admin=$YNH_APP_ARG_ADMIN admin=$YNH_APP_ARG_ADMIN
enable_terminal=$YNH_APP_ARG_ENABLE_TERMINAL
#================================================= #=================================================
# REGISTER DOMAIN # REGISTER DOMAIN
@ -51,6 +52,7 @@ ynh_app_setting_set $app admin $admin
ynh_app_setting_set $app domain $domain ynh_app_setting_set $app domain $domain
ynh_app_setting_set $app path_url $path_url ynh_app_setting_set $app path_url $path_url
ynh_app_setting_set $app is_public $is_public ynh_app_setting_set $app is_public $is_public
ynh_app_setting_set $app enable_terminal $is_public
#================================================= #=================================================
# STANDARD MODIFICATIONS # STANDARD MODIFICATIONS