fix if statements that check for files
This commit is contained in:
parent
bc12158b9e
commit
7acc436e61
|
@ -39,31 +39,31 @@ fi
|
||||||
if [ ! -f /etc/ssl/dkim/$domain.dkim ]; then
|
if [ ! -f /etc/ssl/dkim/$domain.dkim ]; then
|
||||||
echo "DKIM for $domain does not exist."
|
echo "DKIM for $domain does not exist."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
else
|
||||||
|
if [[ -f /etc/ssl/dkim/$domain.selector ]]; then
|
||||||
if [[ -f /etc/ssl/dkim/$domain.selector ]]; then
|
|
||||||
echo Deleting the `cat /etc/ssl/dkim/$domain.selector`._domainkey.$domain DKIM key.
|
echo Deleting the `cat /etc/ssl/dkim/$domain.selector`._domainkey.$domain DKIM key.
|
||||||
if [[ -f /usr/local/etc/pdns.conf ]] &&
|
if [[ -f /usr/local/etc/pdns.conf ]]; then
|
||||||
echo To remove the associated DNS record run this command:
|
echo To remove the associated DNS record run this command:
|
||||||
echo
|
echo
|
||||||
echo pdns-rr-del.sh -z $domain -n `cat /etc/ssl/dkim/$domain.selector`._domainkey.$domain -t TXT
|
echo pdns-rr-del.sh -z $domain -n `cat /etc/ssl/dkim/$domain.selector`._domainkey.$domain -t TXT
|
||||||
else
|
else
|
||||||
echo You can now delete the DNS TXT record for `cat /etc/ssl/dkim/$domain.selector`._domainkey.$domain
|
echo You can now delete the DNS TXT record for `cat /etc/ssl/dkim/$domain.selector`._domainkey.$domain
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo You can now delete the associated DNS TXT record.
|
echo You can now delete the associated DNS TXT record.
|
||||||
|
fi
|
||||||
|
rm /etc/ssl/dkim/$domain.dkim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
rm /etc/ssl/dkim/$domain.dkim
|
if [ -f /etc/ssl/dkim/$domain.dns ]; then
|
||||||
if [ ! -f /etc/ssl/dkim/$domain.dns ]; then
|
|
||||||
rm /etc/ssl/dkim/$domain.dns
|
rm /etc/ssl/dkim/$domain.dns
|
||||||
fi
|
fi
|
||||||
if [ ! -f /etc/ssl/dkim/$domain.pem ]; then
|
if [ -f /etc/ssl/dkim/$domain.pem ]; then
|
||||||
rm /etc/ssl/dkim/$domain.pem
|
rm /etc/ssl/dkim/$domain.pem
|
||||||
fi
|
fi
|
||||||
if [ ! -f /etc/ssl/dkim/$domain.pub ]; then
|
if [ -f /etc/ssl/dkim/$domain.pub ]; then
|
||||||
rm /etc/ssl/dkim/$domain.pub
|
rm /etc/ssl/dkim/$domain.pub
|
||||||
fi
|
fi
|
||||||
if [ ! -f /etc/ssl/dkim/$domain.selector ]; then
|
if [ -f /etc/ssl/dkim/$domain.selector ]; then
|
||||||
rm /etc/ssl/dkim/$domain.selector
|
rm /etc/ssl/dkim/$domain.selector
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user