diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-28 04:39:51 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2016-03-28 04:39:51 -0300 |
commit | dee18d3b579f4bc4b949651389e1d96250e543fc (patch) | |
tree | 5502520d851c64051e81cbf818274e3bba61c401 /pcr/mailpile/mailpile.install | |
parent | 4c0ead787d0a9e1b3fde331e17f7743ede8fcb77 (diff) | |
download | abslibre-dee18d3b579f4bc4b949651389e1d96250e543fc.tar.gz abslibre-dee18d3b579f4bc4b949651389e1d96250e543fc.tar.bz2 abslibre-dee18d3b579f4bc4b949651389e1d96250e543fc.zip |
mailpile: add new package to [pcr]
Diffstat (limited to 'pcr/mailpile/mailpile.install')
-rw-r--r-- | pcr/mailpile/mailpile.install | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pcr/mailpile/mailpile.install b/pcr/mailpile/mailpile.install new file mode 100644 index 000000000..fbfbd5a70 --- /dev/null +++ b/pcr/mailpile/mailpile.install @@ -0,0 +1,34 @@ +post_install() { + post_upgrade $1 + + echo "" + echo "==> Note: Mailpile is still in development and not" + echo "==> suitable for production or end-user use." + echo "" + echo "==> Get more info at:" + echo "==> https://github.com/pagekite/Mailpile/wiki/Getting-started" + echo "" +} + +# arg 2: the old package version +post_upgrade() { + if ! getent group mailpile >/dev/null; then + groupadd --system mailpile + fi + + if ! getent passwd mailpile >/dev/null; then + useradd --system -c 'mailpile daemon user' -g mailpile -b /var/lib -m -s /bin/bash mailpile >/dev/null 2>&1 + elif ! test -d /var/lib/mailpile; then + mkhomedir_helper mailpile + fi + + if test $2 && test "`vercmp $2 0.4.1-1`" -lt 0; then + echo '==> Mailpile home directory has moved to /var/lib/mailpile' + fi +} + +post_remove() { + systemctl stop mailpile >/dev/null 2>&1 + + echo "==> Note: /var/lib/mailpile may still contain data" +} |