#!/usr/bin/perl

use strict;
use warnings;
use JSON;

my $config_filename = '/etc/systemimager/systemimager.json';

my $config_raw_text = do {
	open(my $json_fh, "<:encoding(UTF-8)", $config_filename)
		or die("Can't open \$filename\": $!\n");
	local $/;
	<$json_fh>
};

my $json = JSON->new;
my $config = $json->decode($config_raw_text);

print "Reading ".$config_filename."...\n";
foreach my $key (keys $config) {
	print $key." = ".$config->{$key}."\n";
}
