HEX
Server: CentOS WebPanel: Protected by Mod Security
System: Linux sites.annaiservers.com 3.10.0-1160.118.1.el7.x86_64 #1 SMP Wed Apr 24 16:01:50 UTC 2024 x86_64
User: freeval (1012)
PHP: 8.1.10
Disabled: NONE
Upload Files
File: //scripts/autossl_reload
#!/bin/bash

# check if there was recent changes in the ssl certs
CERTFILES=`find /etc/pki/tls/certs/ -ctime -1 -name "*.bundle"`

# if there was recent changes check if restart/reload was done and do reload if not
if [[ ! -z "$CERTFILES" ]];then
	grep "`date '+%Y-%m-%d' -d '1 day ago'`\|`date '+%Y-%m-%d'`" /var/log/cwp/services_action.log  | grep "nginx:\|httpd:" | grep "reload\|restart" 1> /dev/null 2> /dev/null || /scripts/cwp_api webservers reload
fi