/[smecontribs]/rpms/smeserver-dirty-tools/contribs10/smeserver-dirty-tools-fix-maxdepth.patch
ViewVC logotype

Annotation of /rpms/smeserver-dirty-tools/contribs10/smeserver-dirty-tools-fix-maxdepth.patch

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


Revision 1.1 - (hide annotations) (download)
Fri Nov 12 12:06:24 2021 UTC (2 years, 11 months ago) by jcrisp
Branch: MAIN
CVS Tags: smeserver-dirty-tools-0_1_0-5_el7_sme, HEAD
* Fri Nov 12 2021 John Crisp <jcrisp@safeandsoundit.co.uk> 0.1.0-5.sme
- fix dt-dovecot-indexfiles-delete maxdepth [SME: 11621]

1 jcrisp 1.1 diff -ruN smeserver-dirty-tools-0.1.0.old/root/sbin/e-smith/dt-dovecot-indexfiles-delete smeserver-dirty-tools-0.1.0/root/sbin/e-smith/dt-dovecot-indexfiles-delete
2     --- smeserver-dirty-tools-0.1.0.old/root/sbin/e-smith/dt-dovecot-indexfiles-delete 2021-06-04 14:43:39.000000000 +0100
3     +++ smeserver-dirty-tools-0.1.0/root/sbin/e-smith/dt-dovecot-indexfiles-delete 2021-11-11 15:03:18.383879108 +0000
4     @@ -7,12 +7,17 @@
5    
6     echo "Deleting Dovecot's index files";
7    
8     -USERS=`/usr/bin/find /home/e-smith/files/users -type d -maxdepth 1` # users
9     +# Find users - also finds /home/e-smith/files/users
10     +USERS=`/usr/bin/find /home/e-smith/files/users -maxdepth 1 -type d`
11     +
12     +# Add Admin dir
13     USERS="/home/e-smith/ $USERS" # admin
14     +
15     for u in $USERS; do
16     +# Ignore dirs without Maildir
17     ! /usr/bin/test -d $u/Maildir && continue
18     /usr/bin/find $u/Maildir -maxdepth 2 -type f -name "dovecot.index*" -exec /bin/rm -f '{}' \;
19     /usr/bin/find $u/Maildir -maxdepth 2 -type f -name ".imap.index*" -exec /bin/rm -f '{}' \;
20     done
21    
22     -
23     +echo "Completed";

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