mailpile.install 918 B

1234567891011121314151617181920212223242526272829303132333435
  1. post_install() {
  2. post_upgrade $1
  3. echo ""
  4. echo "==> Note: Mailpile is still in development and not"
  5. echo "==> suitable for production or end-user use."
  6. echo ""
  7. echo "==> Get more info at:"
  8. echo "==> https://github.com/pagekite/Mailpile/wiki/Getting-started"
  9. echo ""
  10. }
  11. # arg 2: the old package version
  12. post_upgrade() {
  13. if ! getent group mailpile >/dev/null; then
  14. groupadd --system mailpile
  15. fi
  16. if ! getent passwd mailpile >/dev/null; then
  17. useradd --system -c 'mailpile daemon user' -g mailpile -b /var/lib -m -s /bin/bash mailpile >/dev/null 2>&1
  18. elif ! test -d /var/lib/mailpile; then
  19. mkhomedir_helper mailpile
  20. fi
  21. if test $2 && test "`vercmp $2 0.4.1-1`" -lt 0; then
  22. echo '==> Mailpile home directory has moved to /var/lib/mailpile'
  23. fi
  24. }
  25. post_remove() {
  26. systemctl stop mailpile >/dev/null 2>&1
  27. echo "==> Note: /var/lib/mailpile may still contain data"
  28. }