aboutsummaryrefslogtreecommitdiffstats
path: root/mkpeople
diff options
context:
space:
mode:
Diffstat (limited to 'mkpeople')
-rwxr-xr-xmkpeople15
1 files changed, 15 insertions, 0 deletions
diff --git a/mkpeople b/mkpeople
index 9e782b1..cd21239 100755
--- a/mkpeople
+++ b/mkpeople
@@ -98,6 +98,20 @@ sub output_groups {
$template->process("groupindex.$extension", $vars, "index.$extension");
}
+sub output_index {
+ my ($extension) = @_;
+ my $template = Template->new({
+ INCLUDE_PATH => $config->{tmpl_dir},
+ OUTPUT_PATH => "$config->{output_dir}",
+ });
+ my $vars = {
+ config => $config,
+ users => \%users,
+ groups => \%groups,
+ };
+ $template->process("index.$extension", $vars, "index.$extension");
+}
+
my $bindpw = read_file($config->{bindpwfile});
chomp $bindpw;
my $ldap = Net::LDAP->new($config->{ldapserver}) or die "$@";
@@ -109,3 +123,4 @@ die $m->error if $m->is_error;
loadgroups($ldap);
output_users('html');
output_groups('html');
+output_index('html');