diff --git a/scripts/install b/scripts/install index c282aca..04851d5 100644 --- a/scripts/install +++ b/scripts/install @@ -136,7 +136,7 @@ swap_needed=0 if [ $total_memory -lt $memory_needed ]; then # Need a minimum of memory - if [ -n "$(grep 'kthreadd' /proc/2/status 2>/dev/null)" ]; then + if [ "$(systemd-detect-virt)" == "none" ]; then swap_needed=$(($memory_needed - $total_memory)) ynh_script_progression --message="Adding $swap_needed Mo to swap..." ynh_add_swap --size=$swap_needed