X-Git-Url: https://git.toastfreeware.priv.at/toast/tdyndns.git/blobdiff_plain/7abff91300d6a588da42cc2841e5fc973fe95602..c980b99a240110e554b0cc09e96dd52daca5e74c:/bin/tdyndns_update diff --git a/bin/tdyndns_update b/bin/tdyndns_update index 27bfed0..8806c8a 100755 --- a/bin/tdyndns_update +++ b/bin/tdyndns_update @@ -71,19 +71,21 @@ def nsupdate_delete(fqdn, ip_family): def blockip_whitelist_add(ip): """ :param ip: ipv4 address - :raises a CalledProcessError in case of errors.""" + """ if ipfamily_by_ip(ip) == 'A': command = ['iptables', '-I', 'blockip', '-s', str(ip), '-j', 'ACCEPT'] - check_call(command) + p = Popen(command, stderr=PIPE) + stdout, stderr = p.communicate() def blockip_whitelist_delete(ip): """ :param ip: ipv4 address - :raises a CalledProcessError in case of errors.""" + """ if ipfamily_by_ip(ip) == 'A': command = ['iptables', '-D', 'blockip', '-s', str(ip), '-j', 'ACCEPT'] - check_call(command) + p = Popen(command, stderr=PIPE) + stdout, stderr = p.communicate() def main(args):