Page MenuHomePhorge

kolab-imap.postinst
No OneTemporary

Authored By
Unknown
Size
2 KB
Referenced Files
None
Subscribers
None

kolab-imap.postinst

#!/bin/sh
#DEBHELPER#
case $1 in
configure)
. /usr/share/univention-lib/all.sh
eval "ucr shell hostname domainname server/role"
# Delete the kolab2cal user if we are upgrading from before 3.0
if [ "$1" = configure -a -n "$2" ] && dpkg --compare-versions "$2" lt 3.0-1; then
deluser kolab2cal
if [ -e "/etc/kolab2cal.secret" ]; then
rm -rf /etc/kolab2cal.secret
fi
if [ -e "/etc/kolab2cal.htpasswd" ]; then
rm -rf /etc/kolab2cal.htpasswd
fi
if [ -d "/var/lib/univention-kolab2cal" ]; then
rm -rf /var/lib/univention-kolab2cal
fi
fi
# remove unused cyrus version variable (#1417)
ucr unset mail/cyrus/version 2>/dev/null || :
# stop saslauthd
if [ -x /etc/init.d/saslauthd ]; then
invoke-rc.d saslauthd stop || true
fi
# Ensure our listener is inserted
if [ -d /usr/lib/univention-directory-listener/system/ -a ! -L /usr/lib/univention-directory-listener/system/kolab.py ]; then
if [ -f /usr/share/pyshared/pykolab/ucs/listener.py ]; then
ln -s /usr/share/pyshared/pykolab/ucs/listener.py /usr/lib/univention-directory-listener/system/kolab.py
invoke-rc.d univention-directory-listener restart || true
fi
fi
# run join script
call_joinscript 81kolab-imap.inst
# start kolab-saslauthd
ucr commit /etc/default/kolab-saslauthd
invoke-rc.d kolab-saslauthd start
# configure firewall
ucr set security/packetfilter/package/kolab-imap/tcp/110/all="ACCEPT" \
security/packetfilter/package/kolab-imap/tcp/110/all/en="POP3" \
security/packetfilter/package/kolab-imap/tcp/143/all="ACCEPT" \
security/packetfilter/package/kolab-imap/tcp/143/all/en="IMAP" \
security/packetfilter/package/kolab-imap/tcp/993/all="ACCEPT" \
security/packetfilter/package/kolab-imap/tcp/993/all/en="IMAPS" \
security/packetfilter/package/kolab-imap/tcp/995/all="ACCEPT" \
security/packetfilter/package/kolab-imap/tcp/995/all/en="POP3S" \
security/packetfilter/package/kolab-imap/tcp/4190/all="ACCEPT" \
security/packetfilter/package/kolab-imap/tcp/4190/all/en="Sieve"
[ -x "/etc/init.d/univention-firewall" ] && invoke-rc.d univention-firewall restart
if dpkg-statoverride --list /var/lib/kolab >/dev/null; then
dpkg-statoverride --remove /var/lib/kolab
fi
dpkg-statoverride --update --add listener nogroup 775 /var/lib/kolab
;;
esac
exit 0

File Metadata

Mime Type
text/x-shellscript
Expires
Fri, Apr 24, 9:56 AM (6 d, 10 h ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
18878107
Default Alt Text
kolab-imap.postinst (2 KB)

Event Timeline