Author Topic: Just a proposal to the developers  (Read 6542 times)

0 Members and 1 Guest are viewing this topic.

Offline
***
Just a proposal to the developers
« on: October 09, 2017, 11:20:29 AM »
How about to try something like this:
Code: [Select]
ip=`dig +short myip.opendns.com @resolver1.opendns.com`
rev=`dig -x $ip | grep PTR | awk '{print $4}'`
if [ ! $rev == "" ]; then
        wget https://dl.eff.org/certbot-auto
        chmod a+x certbot-auto
        /usr/local/src/certbot-auto certonly --agree-tos --renew-by-default -d $rev && cp -f /etc/letsencrypt/live/$rev/fullchain.pem /etc/pki/tls/certs/$rev.crt && cp -f /etc/letsencrypt/live/$rev/privkey.pem /etc/pki/tls/private/$rev.key && cp -f /etc/letsencrypt/live/$rev/chain.pem /etc/pki/tls/certs/$rev.bundle
else
        standart cert creation from CWP
fi
If the IP of the user resolves to a domain (which is less likely to happen) the installer to create a green certificate for CWP:2031, if not - create standart CWP certificate.
UNIX is a very simple OS, but you have to be a GENIUS to understand it ...