Execute command
(command, iptables_file)
| 211 | |
| 212 | |
| 213 | def save_iptables(command, iptables_file): |
| 214 | """ Execute command """ |
| 215 | logging.debug("Saving iptables for %s" % command) |
| 216 | |
| 217 | result = execute(command) |
| 218 | fIptables = open(iptables_file, "w+") |
| 219 | |
| 220 | for line in result: |
| 221 | fIptables.write(line) |
| 222 | fIptables.write("\n") |
| 223 | fIptables.close() |
| 224 | |
| 225 | |
| 226 | def execute2(command, wait=True): |