if openssl x509 -in /etc/vmware/ssl/rui.crt -checkend 86400 |grep "not"
then
echo "Certificate is good for another day!"
else
echo "Certificate has expired or will do so within 24 hours!"
scp zhaxg@192.168.132.1:/koolshare/acme/.rv.com.cn/fullchain.cer /etc/vmware/ssl/rui.crt
scp zhaxg@192.168.132.1:/koolshare/acme/.rv.com.cn/*.rv.com.cn.key /etc/vmware/ssl/rui.key
/etc/init.d/hostd restart
/etc/init.d/vpxa restart
fi
!/bin/sh
if openssl x509 -in /etc/vmware/ssl/rui.crt -checkend 86400 |grep "not" then echo "Certificate is good for another day!" else echo "Certificate has expired or will do so within 24 hours!" scp zhaxg@192.168.132.1:/koolshare/acme/.rv.com.cn/fullchain.cer /etc/vmware/ssl/rui.crt scp zhaxg@192.168.132.1:/koolshare/acme/.rv.com.cn/*.rv.com.cn.key /etc/vmware/ssl/rui.key /etc/init.d/hostd restart /etc/init.d/vpxa restart fi