Use the customiser to set the background-image of a div

Figured it out:
Firstly there is a spelling mistake in that i’m using ‘post-box-image’ instead of ‘post_box_image’…

Secondly it’s better to do it this way in functions.php:

function jhwd_blog_theme_customize_css()
{
?>
    <style type="text/css">
        .post-block { 
            background-image:url('<?php echo get_theme_mod( 'post_box_image' );?>'); 
            background-color: <?php echo get_theme_mod( 'post_box_color' );?>;
        }
        .post-block>h1, .post-boxes {
            background-color: <?php echo get_theme_mod( 'post_boxes_items_color' );?>;
        }
    </style>
<?php
}
add_action( 'wp_head', 'jhwd_blog_theme_customize_css');