export virtualisation var

This commit is contained in:
oiseauroch 2022-11-30 11:40:43 +01:00
parent a0ee0ec724
commit 94188611cf
4 changed files with 7 additions and 0 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
*~
*.sw[op]
.apps/
.apps_git_clone_cache
.spdx_licenses

View File

@ -92,7 +92,9 @@ ynh_script_progression --message="Checking virtualisation availability…" --wei
if [ "$(which modprobe)" = "" ]
then
virtualisation=false
export VIRTUALISATION=false
else
export VIRTUALISATION=false
virtualisation=true
fi
ynh_app_setting_set --app=$app --key=virtualisation --value=$virtualisation

View File

@ -29,6 +29,7 @@ virtualisation=$(ynh_app_setting_get --app=$app --key=virtualisation)
if [ "$virtualisation" = "true" ]
then
nbd_index=$(ynh_app_setting_get --app=$app --key=nbd_index)
export VIRTUALISTATION=true
fi
#=================================================
# REMOVE NODE CONFIGURATION

View File

@ -78,6 +78,7 @@ mkdir -p "$datadir/data"
if [ "$virtualisation" = "true" ]
then
export VIRTUALISATION=true
# Define and install dependencies
ynh_install_app_dependencies $pkg_dependencies_virtualisation
# to be sure to not exceed size limit, i use a virtual disk with a fix size to have a max limit size.