function test_nftables { systemctl restart nftables || systemctl status nftables echo "post" read -p "press any key, or nft will be flushed" -t 30 if [ $? -eq 0 ]; then echo -e "\nKeeping nft ruleset" else echo -e "\nRemoving nft ruleset" nft flush ruleset fi }