From 07711461cf66895d5ddb4de003af04652bfc8807 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 7 Feb 2014 14:55:26 +0100 Subject: [PATCH] Migrate limits from imaps to imap DB entry --- root/etc/e-smith/db/configuration/migrate/ImapsLimits | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 root/etc/e-smith/db/configuration/migrate/ImapsLimits diff --git a/root/etc/e-smith/db/configuration/migrate/ImapsLimits b/root/etc/e-smith/db/configuration/migrate/ImapsLimits new file mode 100644 index 0000000..38a5270 --- /dev/null +++ b/root/etc/e-smith/db/configuration/migrate/ImapsLimits @@ -0,0 +1,12 @@ +{ + +# Those limits are now defined on the imap entry +foreach my $prop (qw/ConcurrencyLimit ConcurrencyLimitPerIP ProcessMemoryLimit/){ + my $imaps_value = $DB->get_prop_and_delete('imaps', $prop); + next unless ($imaps_value); + my $imap_value = $DB->get_prop('imap', $prop); + next if ($imap_value); + $DB->set_prop('imap', $prop, $imaps_value); +} + +}