test for push
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
## 0 4 * * * bash /data/scripts/sslcerts/create_sites.sh > /data/scripts/sslcerts/sites.txt
|
||||
## 0 5 * * * bash /data/scripts/sslcerts/checksslcerts.sh 2>&1 > /tmp/checksslcert.log
|
||||
|
||||
#!/bin/bash
|
||||
|
||||
sites=$(cat ./sites.txt)
|
||||
|
||||
@@ -14,23 +13,14 @@ for site in `echo $sites`
|
||||
do
|
||||
export SITE_URL=$site
|
||||
|
||||
#echo $SITE_URL
|
||||
#echo -n " - "
|
||||
|
||||
|
||||
notAfter=$(/usr/bin/openssl s_client -connect ${SITE_URL}:${SITE_SSL_PORT} \
|
||||
-servername ${SITE_URL} 2> /dev/null | /usr/bin/openssl x509 -noout -dates | grep notAfter)
|
||||
|
||||
not_after=$(echo "$notAfter" | cut -d= -f2-)
|
||||
#echo " $not_after"
|
||||
|
||||
now_ts=$(date +%s)
|
||||
#echo " $now_ts"
|
||||
|
||||
expiry_ts=$(date -d "$not_after" +%s)
|
||||
diff_sec=$((expiry_ts - now_ts))
|
||||
diff_days=$((diff_sec / 86400))
|
||||
#echo " $diff_days"
|
||||
|
||||
if [ "$not_after" != "" ]
|
||||
then
|
||||
|
||||
Reference in New Issue
Block a user