108 |
/usr/sbin/groupadd -g 439 sharedmailbox 2> /dev/null || : |
/usr/sbin/groupadd -g 439 sharedmailbox 2> /dev/null || : |
109 |
|
|
110 |
%post |
%post |
111 |
# Migrate the sharedmailbox dict to its new location |
if [ -s /home/e-smith/db/dovecot/sharedmailbox.db ] ; then |
112 |
if [ -e /etc/dovecot/sharedmailbox/dict.db ]; then |
# echo "we already have a non empty file at destination" ; |
113 |
mv -f /etc/dovecot/sharedmailbox/dict.db /home/e-smith/db/dovecot/sharedmailbox.db |
# delete etc file if empty |
114 |
|
if [ -e /etc/dovecot/sharedmailbox/dict.db ] ; then |
115 |
|
# if exists and not empty we backup, else we delete |
116 |
|
[ -s /etc/dovecot/sharedmailbox/dict.db ] && mv -f /etc/dovecot/sharedmailbox/dict.db /home/e-smith/db/dovecot/dictdb.old || rm -rf /etc/dovecot/sharedmailbox ; |
117 |
|
fi |
118 |
|
elif [ -e /etc/dovecot/sharedmailbox/dict.db ]; then |
119 |
|
# if exists and not empty |
120 |
|
[ -s /home/e-smith/db/dovecot/sharedmailbox.db ] && mv -f /etc/dovecot/sharedmailbox/dict.db /home/e-smith/db/dovecot/sharedmailbox.db ; |
121 |
|
# then we remove the etc dir ; |
122 |
rm -rf /etc/dovecot/sharedmailbox |
rm -rf /etc/dovecot/sharedmailbox |
123 |
fi |
fi |
124 |
|
|