Commit 1387839c authored by Nigel Kukard's avatar Nigel Kukard

Load template configuration with local admin access

parent d98f0e6e
......@@ -322,6 +322,24 @@ sub cmd_connect
my $server = wiaflos::client::fakeserver->new();
$server->{'inifile'} = \%config;
# Template engine config
my @template_params = (
'path',
'debug',
'global_header',
'global_footer',
);
my $templates;
foreach my $param (@template_params) {
$templates->{$param} = $config{'templates'}{$param} if (defined($config{'templates'}{$param}));
}
if (!defined($templates->{'path'})) {
print(STDERR "ERROR: Under 'templates' section, required parameter 'path' not found");
exit 1;
}
$server->{'template_config'} = $templates;
# Init authentication
wiaflos::server::api::auth::init($server);
# Init config
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment