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

Fix permissions

This commit is contained in:
Jules-Bertholet 2021-05-29 15:07:22 +00:00
parent 358805a003
commit 23f8695b95
4 changed files with 19 additions and 18 deletions

View file

@ -15,6 +15,20 @@ jupyterlab_version="3.0.14"
# PERSONAL HELPERS
#=================================================
function python_setup {
pushd "$final_path"
sudo -u $app PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyterhub-ldapauthenticator pyzmq --three 2>&1
sudo -u $app python3 -m pipenv run jupyterhub upgrade-db 2>&1
popd
}
function set_permissions {
# Set permissions to app files
chown -R root:$app "$final_path"
chown -R $app:$app "$final_path/.venv"
chmod -R g=u,g-w,o-rwx "$final_path"
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -94,11 +94,7 @@ ynh_app_setting_set --app=$app --key=final_path --value=$final_path
mkdir -p $final_path
pushd $final_path
PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyterhub-ldapauthenticator pyzmq --three
popd
python_setup
#=================================================
# NGINX CONFIGURATION
@ -147,8 +143,7 @@ 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/
set_permissions
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL

View file

@ -70,8 +70,7 @@ ynh_system_user_create --username=$app
#=================================================
# Restore permissions on app files
chown -R root: $final_path/
chown -R $admin: $final_path/.venv/
set_permissions
#=================================================
# SPECIFIC RESTORATION

View file

@ -117,13 +117,7 @@ then
# Download, check integrity, uncompress and patch the source from app.src
mkdir -p $final_path
pushd $final_path
PIPENV_VENV_IN_PROJECT="enabled" PIPENV_SKIP_LOCK=true ynh_exec_warn_less python3 -m pipenv install jupyterlab==$jupyterlab_version jupyterhub notebook jupyterhub-ldapauthenticator pyzmq
ynh_exec_warn_less python3 -m pipenv run jupyterhub upgrade-db
popd
python_setup
fi
#=================================================
@ -157,8 +151,7 @@ ynh_add_systemd_config
#=================================================
# Set permissions on app files
chown -R root: $final_path/
chown -R $admin: $final_path/.venv/
set_permissions
#=================================================
# ADVERTISE SERVICE IN ADMIN PANEL