diff --git a/manifest.json b/manifest.json index 98dd2df..e3d5995 100644 --- a/manifest.json +++ b/manifest.json @@ -14,7 +14,7 @@ "email": "pierre@kayou.io" }, "requirements": { - "yunohost": ">= 4.1.7" + "yunohost": ">= 4.3.0" }, "multi_instance": true, "services": [ @@ -24,8 +24,7 @@ "install": [ { "name": "domain", - "type": "domain", - "example": "example.com" + "type": "domain" }, { "name": "path", @@ -35,8 +34,7 @@ }, { "name": "admin", - "type": "user", - "example": "johndoe" + "type": "user" }, { "name": "is_public", diff --git a/scripts/_common.sh b/scripts/_common.sh index 95bd0cc..b71b167 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -9,7 +9,7 @@ pkg_dependencies="python3-dev python3-pip libffi-dev libzmq3-dev" nodejs_version="15" -jupyterlab_version="3.1.11" +jupyterlab_version="3.2.4" #================================================= # PERSONAL HELPERS diff --git a/scripts/install b/scripts/install index 290fff2..e36e1bb 100644 --- a/scripts/install +++ b/scripts/install @@ -81,6 +81,14 @@ python3 -m pip install pipenv npm install -g configurable-http-proxy +#================================================= +# CREATE DEDICATED USER +#================================================= +ynh_script_progression --message="Configuring system user..." --weight=1 + +# Create a system user +ynh_system_user_create --username=$app --home_dir="$final_path" + #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= @@ -104,14 +112,6 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1 # Create a dedicated nginx config ynh_add_nginx_config -#================================================= -# CREATE DEDICATED USER -#================================================= -ynh_script_progression --message="Configuring system user..." --weight=1 - -# Create a system user -ynh_system_user_create --username=$app - #================================================= # SPECIFIC SETUP #================================================= @@ -143,8 +143,12 @@ ynh_add_config --template="../conf/jupyter_notebook_config.py" --destination="$f #================================================= # Set permissions to app files -chown -R root: $final_path/ -chown -R $admin: $final_path/.venv/ +#chown -R root: $final_path/ +#chown -R $admin: $final_path/.venv/ + +chmod 750 "$final_path" +chmod -R o-rwx "$final_path" +chown -R $app:www-data "$final_path" #================================================= # ADVERTISE SERVICE IN ADMIN PANEL diff --git a/scripts/restore b/scripts/restore index 5dc2da6..719b8cd 100644 --- a/scripts/restore +++ b/scripts/restore @@ -37,10 +37,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path) #================================================= ynh_script_progression --message="Validating restoration parameters..." --weight=1 -ynh_webpath_available --domain=$domain --path_url=$path_url \ - || ynh_die --message="Path not available: ${domain}${path_url}" -test ! -d $final_path \ - || ynh_die --message="There is already a directory: $final_path " +test ! -d $final_path || ynh_die --message="There is already a directory: $final_path " #================================================= # STANDARD RESTORATION STEPS