0x1949 Team - FAZEMRX - MANAGER
Edit File: cpanel-dovecot.postinst
#!/bin/sh # https://wiki.debian.org/MaintainerScripts ## <asset scriplets/post> set -e if [ -z "${INIT_D}" ]; then INIT_D=0; fi; if [ -z "$RHEL" ]; then RHEL=0; fi; DEFAULT_DH_PEM=/etc/dovecot/ffdhe2048.pem runPost_install() { if [ "${INIT_D}" = "1" ]; then /sbin/chkconfig --add dovecot /sbin/chkconfig --level 35 dovecot on >/dev/null 2>&1 ||: else /usr/bin/systemctl daemon-reload /usr/bin/systemctl enable dovecot fi } runPost_all() { # generate the ssl certificates if [ ! -f /etc/pki/dovecot/certs/dovecot.pem ]; then SSLDIR=/etc/pki/dovecot OPENSSLCONFIG=/etc/pki/dovecot/dovecot-openssl.cnf \ /usr/libexec/dovecot/mkcert.sh &> /dev/null fi # Install default dh.pem if missing or empty if [ ! -s /etc/dovecot/dh.pem ]; then install -p -m 0644 $DEFAULT_DH_PEM /etc/dovecot/dh.pem fi install -d -m 0755 -g dovecot -d /var/run/dovecot install -d -m 0755 -d /var/run/dovecot/empty install -d -m 0750 -g dovenull /var/run/dovecot/login [ -x /usr/local/cpanel/scripts/builddovecotconf ] && /usr/local/cpanel/scripts/builddovecotconf restart_dovecot; } restart_dovecot() { # only start dovecot after having built the configuration if [ "${INIT_D}" = "1" ]; then service dovecot restart >/dev/null 2>&1 ||: else /usr/bin/systemctl daemon-reload /usr/bin/systemctl restart dovecot fi } ## </asset> test -n "$PBUILDER_OPERATION" && echo "Skipping post-install for clamav due to PBUILDER_OPERATION environment variable" && exit 0; case "$1" in configure) if [ "x$2" = 'x' ]; then runPost_install; fi runPost_all; ;; esac exit 0