#!/bin/sh
if [ "$(cat /sys/module/ipv6/parameters/disable)" == "0" ]
then
cat >/etc/imunify360/captcha/ports.conf <<EOF
# IPv4
listen      *:52224;
# IPv6
listen      [::]:52224;
EOF
cat >/etc/imunify360/captcha/ssl_ports.conf <<EOF
# IPv4
listen              *:52223 ssl;
# IPv6
listen              [::]:52223 ssl;
EOF
else
cat >/etc/imunify360/captcha/ports.conf <<EOF
# IPv4 only (IPv6 is disabled)
listen      *:52224;
EOF
cat >/etc/imunify360/captcha/ssl_ports.conf <<EOF
# IPv4 only (IPv6 is disabled)
listen              *:52223 ssl;
EOF
fi
