#!/bin/sh

post_upgrade() {
  # return if old package version greater 3.1.99...
  (( $(vercmp "$2" '3.1.99') > 0 )) && return 0

  # return if neither service nor socket is enabled...
  systemctl -q is-enabled rsyncd.service rsyncd.socket || return 0

  echo ' > The rsync package now uses upstream systemd units, which also protect'
  echo ' > home directories (/root and /home). If you need access use rsync'
  echo ' > via ssh (recommended) or see the wiki for instructions to override:'
  echo ' > https://wiki.archlinux.org/index.php/Rsync#rsync_daemon'
}
