1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/cac-proxy_ynh.git synced 2024-09-03 18:16:07 +02:00

bypass chrome sandbox for kernel 6.x

This commit is contained in:
Gérard Collin 2023-04-15 12:28:56 +02:00
parent 591dc74ed5
commit 5bae1ac2dc
3 changed files with 26 additions and 4 deletions

View file

@ -3,3 +3,4 @@ CACP_REDIRECT_HOST=https://__DOMAIN__
CACP_REDIRECT_PATH=__PATH_URL__ CACP_REDIRECT_PATH=__PATH_URL__
CACP_DEBUG=FALSE CACP_DEBUG=FALSE
CACP_LOG=FALSE CACP_LOG=FALSE
CACP_BYPASS_SANDBOX=__BYPASS_SANDBOX__

View file

@ -208,6 +208,19 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Adding a configuration file..." --weight=1 ynh_script_progression --message="Adding a configuration file..." --weight=1
# We must use chrome sandbox for kernels 5.x, 6.x doesn't need it anymore
kernel_release=$(uname -r)
if [[ $kernel_release == 5.* ]]
then
bypass_sandbox="TRUE"
if [ $install_chromium -eq 1 ]
then
ynh_print_warn --message="Using non sandboxed chromium as kernel release is less than 6.x"
fi
else
bypass_sandbox="FALSE"
fi
ynh_add_config --template=".env" --destination="$final_path/.env" ynh_add_config --template=".env" --destination="$final_path/.env"
# FIXME: this should be handled by the core in the future # FIXME: this should be handled by the core in the future

View file

@ -192,10 +192,18 @@ ynh_add_nginx_config
#================================================= #=================================================
ynh_script_progression --message="Updating a configuration file..." --weight=1 ynh_script_progression --message="Updating a configuration file..." --weight=1
### Same as during install # We must use chrome sandbox for kernels 5.x, 6.x doesn't need it anymore
### kernel_release=$(uname -r)
### The file will automatically be backed-up if it's found to be manually modified (because if [[ $kernel_release == 5.* ]]
### ynh_add_config keeps track of the file's checksum) then
bypass_sandbox="TRUE"
if [ $install_chromium -eq 1 ]
then
ynh_print_warn --message="Using non sandboxed chromium as kernel release is less than 6.x"
fi
else
bypass_sandbox="FALSE"
fi
ynh_add_config --template=".env" --destination="$final_path/.env" ynh_add_config --template=".env" --destination="$final_path/.env"