Kolab-Templates
view release on metacpan or search on metacpan
lib/Kolab/Templates.pm view on Meta::CPAN
}
print $tmpfile $_;
}
undef $fh;
undef $tmpfile;
copy($new, $old);
copy($tmp, $new);
chown($Kolab::config{"kolab_uid"}, $Kolab::config{"kolab_gid"}, $new);
}
if ($nochange) {
Kolab::log(PREFIX, "Skipping diff cmd (option 'nochange' specified)", KOLAB_DEBUG);
} elsif ($templates{$file}->{META_ALWAYS_CHANGE()}) {
# If always_change is set, then there's no need to perform the diff command
Kolab::log(PREFIX, "Skipping change calc (mvar " . META_ALWAYS_CHANGE . " is set)", KOLAB_DEBUG);
$haschanged = 1;
} elsif (!$templates{$file}->{META_DIFF_CMD()}) {
# If there isn't a command to calculate changes, then there's no need to go on
lib/Kolab/Templates.pm view on Meta::CPAN
}
# sub buildCyrusGroups
# {
# Kolab::log(PREFIX, 'Building Cyrus groups', KOLAB_DEBUG);
#
# my $prefix = $Kolab::config{'kolab_root'};
# my $cfg = "$prefix/etc/imapd/imapd.group";
# my $oldcfg = $cfg . '.old';
# copy($cfg, $oldcfg);
# chown($Kolab::config{'kolab_uid'}, $Kolab::config{'kolab_gid'}, $oldcfg);
# copy("$prefix/etc/kolab/imapd.group.template", $cfg);
# my $groupconf;
# if (!($groupconf = IO::File->new($cfg, 'a'))) {
# Kolab::log(PREFIX, "Unable to open configuration file `$cfg'", KOLAB_ERROR);
# exit(1);
# }
#
# my $ldap = Kolab::LDAP::create(
# $Kolab::config{'ldap_ip'},
# $Kolab::config{'ldap_port'},
lib/Kolab/Templates.pm view on Meta::CPAN
# Kolab::log(PREFIX, "Adding cyrus group `$group'");
# $count++;
# }
# } else {
# Kolab::log(PREFIX, 'No Cyrus groups found');
# }
#
# $groupconf->close;
# Kolab::LDAP::destroy($ldap);
#
# chown($Kolab::config{'kolab_uid'}, $Kolab::config{'kolab_gid'}, $cfg);
#
# if (-f $oldcfg) {
# my $rc = `diff -q $cfg $oldcfg`;
# chomp($rc);
# if ($rc) {
# Kolab::log(PREFIX, "`$cfg' change detected: $rc", KOLAB_DEBUG);
# $Kolab::haschanged{'imapd'} = 1;
# }
# } else {
# $Kolab::haschanged{'imapd'} = 1;
( run in 1.083 second using v1.01-cache-2.11-cpan-71847e10f99 )