diff options
author | Beech Rintoul <beech@FreeBSD.org> | 2008-09-17 19:05:29 +0000 |
---|---|---|
committer | Beech Rintoul <beech@FreeBSD.org> | 2008-09-17 19:05:29 +0000 |
commit | 72dae412ba3be3a074c52d4eeb8aa751c343a808 (patch) | |
tree | e78689f8870a7b75ba11a326774a6c5c792e0c64 /mail/dovecot/files | |
parent | eed6489990b4836fc0d05c76f409006bb5872ceb (diff) | |
download | ports-72dae412ba3be3a074c52d4eeb8aa751c343a808.tar.gz ports-72dae412ba3be3a074c52d4eeb8aa751c343a808.zip |
Notes
Diffstat (limited to 'mail/dovecot/files')
-rw-r--r-- | mail/dovecot/files/dovecot.sh.in | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/mail/dovecot/files/dovecot.sh.in b/mail/dovecot/files/dovecot.sh.in index 17263cb5c4d5..25fb7281c054 100644 --- a/mail/dovecot/files/dovecot.sh.in +++ b/mail/dovecot/files/dovecot.sh.in @@ -28,9 +28,12 @@ extra_commands="restart" dovecot_prestart() { # Ensure runtime directories exist with correct permissions - base=/var/run/dovecot + local base user gid + base=/var/run/${name} + user=$(awk -F '[[:space:]]*=[[:space:]]*' '/^[[:space:]]*login_user[[:space:]]*=/ { print $2 }' ${required_files}) + gid=$(pw usershow -n "${user:-${name}}" 2>/dev/null | cut -d: -f4) /usr/bin/install -o root -g wheel -m 0755 -d ${base} - /usr/bin/install -o root -g dovecot -m 0750 -d ${base}/login + /usr/bin/install -o root -g ${gid} -m 0750 -d ${base}/login } load_rc_config ${name} |