Update v-make-ip-ssl

This commit is contained in:
myvesta 2020-08-15 23:46:00 +02:00 committed by GitHub
parent 1f11dfbbf2
commit cc0527a8dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -38,12 +38,15 @@ is_object_unsuspended 'user' 'USER' "$user"
# Action #
#----------------------------------------------------------#
if [ ! -f "/etc/exim4/virtual/helo_data" ]; then
exit 1
fi
echo "Script ran with: $user $domain" >> /usr/local/vesta/log/v-make-ip-ssl.log
grepr=$(grep -c "^$domain:" /etc/exim4/virtual/interfaces)
grepr=$(grep -c ": $domain$" /etc/exim4/virtual/helo_data)
if [ $grepr -ge 1 ]; then
grepr=$(grep "^$domain:" /etc/exim4/virtual/interfaces)
ip=${grepr/$domain: /}
ip=$(grep ": $domain$" /etc/exim4/virtual/helo_data | awk -F: '{print $1}')
if [ ! -z "$ip" ]; then
echo "Processinng $domain" >> /usr/local/vesta/log/v-make-ip-ssl.log
echo "IP = $ip" >> /usr/local/vesta/log/v-make-ip-ssl.log