/[smecontribs]/rpms/smeserver-dirty-tools/contribs7/smeserver-dirty-tools-0.0.9-bug_4001.patch
ViewVC logotype

Contents of /rpms/smeserver-dirty-tools/contribs7/smeserver-dirty-tools-0.0.9-bug_4001.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Tue Nov 25 16:20:21 2008 UTC (15 years, 5 months ago) by slords
Branch: MAIN
CVS Tags: smeserver-dirty-tools-0_0_9-3_el4_sme, HEAD
Changes since 1.2: +0 -0 lines
Restore

1 --- smeserver-dirty-tools-0.0.9/root/sbin/e-smith/dt-dovecot-indexfiles-delete.bug_4001 2008-03-01 10:29:59.000000000 +0100
2 +++ smeserver-dirty-tools-0.0.9/root/sbin/e-smith/dt-dovecot-indexfiles-delete 2008-03-01 10:30:34.000000000 +0100
3 @@ -1,12 +1,18 @@
4 -#!/usr/bin/perl
5 -# (C) 2007 Michael Weinberger
6 +#!/bin/bash
7 +# (C) 2008 Michael Weinberger
8 # See http://wiki.contribs.org/Dirty_Tools for full documentation
9
10 # Sometimes Dovecot index files are corrupted after a restore
11 # It is save to delete them all. Dovecot will rebuild them when the mailbox is accessed.
12
13 -print "Deleting Dovecot imap index files\n";
14 +echo "Deleting Dovecot's index files";
15 +
16 +USERS=`/usr/bin/find /home/e-smith/files/users -type d -maxdepth 1` # users
17 +USERS="/home/e-smith/ $USERS" # admin
18 +for u in $USERS; do
19 + ! /usr/bin/test -d $u/Maildir && continue
20 + /usr/bin/find $u/Maildir -maxdepth 2 -type f -name "dovecot.index*" -exec /bin/rm -f '{}' \;
21 + /usr/bin/find $u/Maildir -maxdepth 2 -type f -name ".imap.index*" -exec /bin/rm -f '{}' \;
22 +done
23
24 -system('cd /home/e-smith/files/users; /usr/bin/find -maxdepth 4 -type f -name ".imap.index*" -print0 | /usr/bin/xargs -0 /bin/rm -f');
25 -system('cd /home/e-smith/Maildir; /usr/bin/find -maxdepth 2 -type f -name ".imap.index*" -print0 | /usr/bin/xargs -0 /bin/rm -f');
26

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed