post_install() { # For systems which previously used a cyrus-imapd package < 3.0: Create # consistency with systems where user and group were created by # systemd-sysusers (which doesn't touch existing users) if ! getent group cyrus 2>&1 >/dev/null; then groupadd -g 70 cyrus fi if getent passwd cyrus 2>&1 >/dev/null && [ $(id -u cyrus) -ne 70 ]; then usermod -u 70 -g cyrus -c "Cyrus IMAP server" -d /var/lib/cyrus -s /sbin/nologin cyrus fi } post_upgrade() { post_install if [ $(vercmp "$2" 3.0) -lt 0 ]; then echo "Cyrus 3.0 contains major changes from previous versions, and so does the Arch" echo "package. Please heed the following information to ensure a clean upgrade:" echo "* For general information about upgrading to Cyrus 3.0 from previous versions," echo " please read https://www.cyrusimap.org/imap/download/upgrade.html." echo "* The suggested default paths /var/imap and /var/spool/imap have been changed" echo " to /var/lib/cyrus and /var/spool/cyrus. This change has been adopted in the" echo " Arch package, however if you want your existing installation to use these new" echo " paths, manual action is required." echo "* On Arch, the cyrus user has been updated to use a fixed uid of 70. Please" echo " adjust any paths owned by that user accordingly, including the previously" echo " mentioned /var/imap and /var/spool/imap." echo "* On Arch, the systemd unit has been renamed from cyrus-master.service to" echo " cyrus-imapd.service for consistency. If the unit was enabled before, you will" echo " have to re-enable it manually." fi }