diff --git a/install_update_dovecot.sh b/install_update_dovecot.sh index 993a7b8..dd7fe67 100755 --- a/install_update_dovecot.sh +++ b/install_update_dovecot.sh @@ -196,7 +196,7 @@ fi [[ -n "$dbuser" ]] || dbuser="postfix" if [[ -z "$dbhost" ]] ; then [[ "$dbhost" = "mysql" ]] && dbhost="127.0.0.1" - [[ "$dbhost" = "postgres" ]] && dbhost="/var/run/postgresql" + [[ "$dbhost" = "postgres" ]] && dbhost="/run/postgresql" fi [[ -n "$cert_base_dir" ]] || cert_base_dir="/etc/dovecot/ssl" @@ -810,7 +810,7 @@ config_params=" --prefix=/usr/local/dovecot-${_version} \ --with-${db_driver} \ --with-gssapi=yes - --with-rundir=/var/run/dovecot" + --with-rundir=/run/dovecot" if $systemd_support ; then config_params="$config_params \ --with-systemdsystemunitdir=/etc/systemd/system/" @@ -977,8 +977,8 @@ cp -r /usr/local/dovecot-${_version}/share/doc/dovecot/example-config/* \ ## - ## - protocols = imap pop3 sieve ## - listen = $ipv4 $ipv6 -## - base_dir = /var/run/dovecot/ -## - state_dir = /var/run/dovecot +## - base_dir =/run/dovecot/ +## - state_dir = /run/dovecot ## - shutdown_clients = no ## - ## - dict { @@ -995,7 +995,7 @@ else fi perl -i -n -p -e "s#^([ ]*)\#?\ ?(protocols\ ?=.*)#\1\#\# \2\n\1protocols = imap pop3 sieve#g" \ /usr/local/dovecot-${_version}/etc/dovecot/dovecot.conf || _failed=true -perl -i -n -p -e "s#^([ ]*)\#?\ ?(base_dir\ ?=.*)#\1\#\# \2\n\1base_dir = /var/run/dovecot/\n\nstate_dir = /var/run/dovecot#g" \ +perl -i -n -p -e "s#^([ ]*)\#?\ ?(base_dir\ ?=.*)#\1\#\# \2\n\1base_dir = /run/dovecot/\n\nstate_dir = /run/dovecot#g" \ /usr/local/dovecot-${_version}/etc/dovecot/dovecot.conf || _failed=true perl -i -n -p -e "s#^([ ]*)\#?\ ?(shutdown_clients\ ?=.*)#\1\#\# \2\n\1shutdown_clients = no#g" \ /usr/local/dovecot-${_version}/etc/dovecot/dovecot.conf || _failed=true @@ -1608,7 +1608,7 @@ fi ## - first_valid_gid = 5000 ## - last_valid_gid = 5000 ## - -## - auth_socket_path = /var/run/dovecot/auth-userdb +## - auth_socket_path = /run/dovecot/auth-userdb ## - mail_plugins = quota | mail_plugins = quota expire ## - ## - mailbox_list_index = yes @@ -1631,7 +1631,7 @@ perl -i -n -p -e "s#^([ ]*)\#?\ ?(first_valid_gid.*)#\1\#\# \2\n\1first_valid_gi /usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true perl -i -n -p -e "s#^([ ]*)\#?\ ?(last_valid_gid.*)#\1\#\# \2\n\1last_valid_gid = 5000#g" \ /usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true -perl -i -n -p -e "s#^([ ]*)\#?\ ?(auth_socket_path\ +=.*)#\1\#\# \2\n\1auth_socket_path = /var/run/dovecot/auth-userdb#g" \ +perl -i -n -p -e "s#^([ ]*)\#?\ ?(auth_socket_path\ +=.*)#\1\#\# \2\n\1auth_socket_path = /run/dovecot/auth-userdb#g" \ /usr/local/dovecot-${_version}/etc/dovecot/conf.d/10-mail.conf || _failed=true if $plugin_expire ; then @@ -1942,7 +1942,7 @@ if [ "$db_driver" = "pgsql" ]; then cat < /usr/local/dovecot-${_version}/etc/dovecot/sql-connect.conf.ext driver = $db_driver -## - if using unix-socket (host=/var/run/postgresql) ensure that +## - if using unix-socket (host=/run/postgresql) ensure that ## - coresponding entries in pg_hba.cof fits ## - for example ## - local all all md5 @@ -2096,7 +2096,7 @@ EOF #sharedscripts #postrotate #/etc/init.d/dovecot reload > /dev/null - #/bin/kill -usr1 'cat /var/run/dovecot/master.pid 2>/dev/null' 2>/dev/null || true + #/bin/kill -usr1 'cat /run/dovecot/master.pid 2>/dev/null' 2>/dev/null || true #endscript } EOF @@ -2425,7 +2425,7 @@ fi # determine the location of the PID file # overide by setting base_dir in conf file or PIDBASE in /etc/defaults/\$NAME PIDBASE=\${PIDBASE:-\`sed -r "s/^[ \t]*base_dir[ \t]*=[ \t]*([^ \t]*)/\1/;t;d" \${CONF}\`} -PIDFILE=\${PIDBASE:-/var/run/dovecot/}master.pid +PIDFILE=\${PIDBASE:-/run/dovecot/}master.pid # # Function that starts the daemon/service @@ -2595,7 +2595,7 @@ EOF echononl "Adjust 'PIDFile' at file 'dovecot.service'.." if [[ -f "/etc/systemd/system/dovecot.service" ]] ; then - if $(grep -q -o -E "^\s*PIDFile\s*=\s*/var/run/" /etc/systemd/system/dovecot.service 2> /dev/null ) ; then + if $(grep -q -o -E "^\s*PIDFile\s*=\s*/run/" /etc/systemd/system/dovecot.service 2> /dev/null ) ; then perl -i -n -p -e "s/^(PIDFile\s*=\/var(\/run\/.+))/#\1\nPIDFile=\2/" /etc/systemd/system/dovecot.service if [[ $? -eq 0 ]]; then echo -e "$rc_done" @@ -3081,7 +3081,7 @@ echononl "\tRenew file sql-dict.conf.ext" if [ "$db_driver" = "pgsql" ]; then cat </usr/local/dovecot-${_version}/etc/dovecot/sql-dict.conf.ext -## - if using unix-socket (host=/var/run/postgresql) ensure that +## - if using unix-socket (host=/run/postgresql) ensure that ## - coresponding entries in pg_hba.cof fits ## - for example ## - local all all md5 @@ -3224,7 +3224,7 @@ EOF echononl "\tRenew file sql-connect.conf.ext" cat < /usr/local/dovecot-${_version}/etc/dovecot/sql-connect.conf.ext driver = $db_driver -## - if using unix-socket (host=/var/run/postgresql) ensure that +## - if using unix-socket (host=/run/postgresql) ensure that ## - coresponding entries in pg_hba.cof fits ## - for example ## - local all all md5 @@ -3684,7 +3684,7 @@ fi ## - } ## - ## - plugin { -## - #acl_shared_dict = file:/var/run/dovecot/shared-mailboxes.db +## - #acl_shared_dict = file:/run/dovecot/shared-mailboxes.db ## - acl_shared_dict = file:/var/vmail/shared-mailboxes.db ## - } ## - @@ -3829,7 +3829,7 @@ if [ "$db_driver" = "pgsql" ]; then ## - adjust/renew file /usr/local/dovecot/etc/dovecot/sql-dict.conf.ext ## - cat </usr/local/dovecot-${_version}/etc/dovecot/sql-dict.conf.ext -## - if using unix-socket (host=/var/run/postgresql) ensure that +## - if using unix-socket (host=/run/postgresql) ensure that ## - coresponding entries in pg_hba.cof fits ## - for example ## - local all all md5