BLACKSITE
:
3.131.13.149
:
103.154.184.216 / www.astitvaad.com
:
Linux vps.readyhost.in 4.18.0-553.6.1.el8.x86_64 #1 SMP Thu May 30 04:13:58 UTC 2024 x86_64
:
/
scripts
/
Upload File:
files >> //scripts/unwanted_dovecot_conf_delete.sh
#!/bin/bash # Directory where domain config files are located config_dir="/etc/dovecot/domains" # Directory where live Let's Encrypt certificates are located certs_dir="/etc/letsencrypt/live" # Loop through each config file in the dovecot domains directory for config_file in "$config_dir"/*; do # Check if config file is a regular file if [ -f "$config_file" ]; then # Extract domain name from the config filename or its content domain=$(grep 'local_name' "$config_file" | awk '{print $2}') # Construct the cert file path cert_file="$certs_dir/${domain}/cert.pem" # Check if cert file exists if [ ! -f "$cert_file" ]; then echo "Certificate file for ${domain} does not exist: $cert_file" echo "Deleting configuration file: $config_file" rm "$config_file" # Uncomment this line to actually delete the files # else # echo "Certificate file exists for ${domain}: $cert_file" fi fi done