Commits

Zhang Huangbin  committed b25a822

Fix last commit.

  • Participants
  • Parent commits 4cdebd3

Comments (0)

Files changed (1)

File iRedMail/functions/cleanup.sh

         export sshd_port='22'
     else
         # Replace port number in iptable, pf and Fail2ban.
-        perl -pi -e 's#(.*, )22( .*)#${1}$ENV{sshd_port}${2}#' ${SAMPLE_DIR}/iptables.rules
+        perl -pi -e 's#(.* )22( .*)#${1}$ENV{sshd_port}${2}#' ${SAMPLE_DIR}/iptables.rules
+        perl -pi -e 's#(.*mail_services=.*)ssh( .*)#${1}$ENV{sshd_port}${2}#' ${SAMPLE_DIR}/pf.conf
 
         [ -f ${FAIL2BAN_JAIL_LOCAL_CONF} ] && \
             perl -pi -e 's#(.*port=.*)ssh(.*)#${1}$ENV{sshd_port}${2}#' ${FAIL2BAN_JAIL_LOCAL_CONF}