summarylogtreecommitdiffstats
path: root/mailpile.install
diff options
context:
space:
mode:
authorMaxim Andersson2015-09-07 13:34:09 +0200
committerMaxim Andersson2015-09-07 13:34:09 +0200
commit843200d301097ce164b96c900848fb76a82f5252 (patch)
tree817d1ba377984fb51ebbd8cafdb89a4c87dc82c8 /mailpile.install
parent965deb1217c3a8110f05b545d21c527adceb8111 (diff)
downloadaur-843200d301097ce164b96c900848fb76a82f5252.tar.gz
Add homedir check
If the homedir of the mailpile user has been deleted (but it's still present in /etc/passwd), then a new homedir has to be created.
Diffstat (limited to 'mailpile.install')
-rw-r--r--mailpile.install2
1 files changed, 2 insertions, 0 deletions
diff --git a/mailpile.install b/mailpile.install
index 50965dba5327..fbfbd5a709ca 100644
--- a/mailpile.install
+++ b/mailpile.install
@@ -18,6 +18,8 @@ post_upgrade() {
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