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:
parent
591dc74ed5
commit
5bae1ac2dc
3 changed files with 26 additions and 4 deletions
|
@ -3,3 +3,4 @@ CACP_REDIRECT_HOST=https://__DOMAIN__
|
|||
CACP_REDIRECT_PATH=__PATH_URL__
|
||||
CACP_DEBUG=FALSE
|
||||
CACP_LOG=FALSE
|
||||
CACP_BYPASS_SANDBOX=__BYPASS_SANDBOX__
|
||||
|
|
|
@ -208,6 +208,19 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
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"
|
||||
|
||||
# FIXME: this should be handled by the core in the future
|
||||
|
|
|
@ -192,10 +192,18 @@ ynh_add_nginx_config
|
|||
#=================================================
|
||||
ynh_script_progression --message="Updating a configuration file..." --weight=1
|
||||
|
||||
### Same as during install
|
||||
###
|
||||
### The file will automatically be backed-up if it's found to be manually modified (because
|
||||
### ynh_add_config keeps track of the file's checksum)
|
||||
# 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"
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue