diff options
Diffstat (limited to 'mail/dovecot/files/dovecot.sh.in')
-rw-r--r-- | mail/dovecot/files/dovecot.sh.in | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/mail/dovecot/files/dovecot.sh.in b/mail/dovecot/files/dovecot.sh.in index 8d125d59a17c..17263cb5c4d5 100644 --- a/mail/dovecot/files/dovecot.sh.in +++ b/mail/dovecot/files/dovecot.sh.in @@ -7,20 +7,31 @@ # REQUIRE: %%REQUIRE%% # KEYWORD: shutdown +# Define these dovecot_* variables in one of these files: +# /etc/rc.conf +# /etc/rc.conf.local +# /etc/rc.conf.d/dovecot # -# Add the following lines to /etc/rc.conf to enable dovecot: -# -#dovecot_enable="YES" +# DO NOT CHANGE THESE DEFAULT VALUES HERE # +: ${dovecot_enable:="NO"} . %%RC_SUBR%% name=dovecot rcvar=`set_rcvar` -: ${dovecot_enable:="NO"} command=%%PREFIX%%/sbin/${name} required_files=%%PREFIX%%/etc/${name}.conf +start_precmd="${name}_prestart" +extra_commands="restart" + +dovecot_prestart() +{ # Ensure runtime directories exist with correct permissions + base=/var/run/dovecot + /usr/bin/install -o root -g wheel -m 0755 -d ${base} + /usr/bin/install -o root -g dovecot -m 0750 -d ${base}/login +} load_rc_config ${name} run_rc_command "$1" |