Created
April 1, 2014 13:12
-
-
Save tpokorra/9913713 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
service cyrus-imapd start | |
sleep 3 | |
toolsdir=`pwd` | |
while read line | |
do | |
domain=$line | |
kontakte=`kolab list-mailbox-metadata "user/*@$domain" | grep -E "Kontakte|Contact"` | |
if [[ ! -z "$kontakte" ]] | |
then | |
while read line2 | |
do | |
folder=${line2/Folder /} | |
echo kolab set-mailbox-metadata "$folder" /shared/vendor/kolab/folder-type contact | |
kolab set-mailbox-metadata "$folder" /shared/vendor/kolab/folder-type contact | |
done <<< "$kontakte" | |
fi | |
kalender=`kolab list-mailbox-metadata "user/*@$domain" | grep -E "Kalender|Calendar"` | |
if [[ ! -z "$kalender" ]] | |
then | |
while read line2 | |
do | |
folder=${line2/Folder /} | |
echo kolab set-mailbox-metadata "$folder" /shared/vendor/kolab/folder-type event | |
kolab set-mailbox-metadata "$folder" /shared/vendor/kolab/folder-type event | |
done <<< "$kalender" | |
fi | |
done < $toolsdir/domains.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment