diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/base/FirewallBackup.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/FirewallBackup.kt similarity index 86% rename from src/main/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/base/FirewallBackup.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/FirewallBackup.kt index a9d5dc0..bbdaccf 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/base/FirewallBackup.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/FirewallBackup.kt @@ -1,4 +1,4 @@ -package org.domaindrivenarchitecture.provs.framework.extensions.server_software.standalone_server.firewall.base +package org.domaindrivenarchitecture.provs.framework.ubuntu.firewall import org.domaindrivenarchitecture.provs.framework.core.Prov import org.domaindrivenarchitecture.provs.framework.core.ProvResult @@ -6,6 +6,7 @@ import java.time.LocalDateTime import java.time.format.DateTimeFormatter +@Suppress("unused") fun Prov.saveIpTablesToFile() = task { val dateTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("-yyyy-MM-dd--HH:mm:ss")) val file = "savedrules$dateTime.txt" @@ -14,6 +15,7 @@ fun Prov.saveIpTablesToFile() = task { cat $file""") } +@Suppress("unused") fun Prov.restoreIpTablesFromFile(file: String? = null) = task { val fileName = file ?: cmd("ls -r a* | head -1\n").out fileName?.let { cmd("sudo iptables-restore < $file") } diff --git a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewall.kt b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/ProvisionFirewall.kt similarity index 97% rename from src/main/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewall.kt rename to src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/ProvisionFirewall.kt index 3c1dd7c..53dc0a9 100644 --- a/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewall.kt +++ b/src/main/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/ProvisionFirewall.kt @@ -1,4 +1,4 @@ -package org.domaindrivenarchitecture.provs.framework.extensions.server_software.standalone_server.firewall +package org.domaindrivenarchitecture.provs.framework.ubuntu.firewall import org.domaindrivenarchitecture.provs.framework.core.Prov import org.domaindrivenarchitecture.provs.framework.core.ProvResult diff --git a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewallKtTest.kt b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/ProvisionFirewallKtTest.kt similarity index 94% rename from src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewallKtTest.kt rename to src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/ProvisionFirewallKtTest.kt index 2c770a0..08f4076 100644 --- a/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/extensions/server_software/standalone_server/firewall/ProvisionFirewallKtTest.kt +++ b/src/test/kotlin/org/domaindrivenarchitecture/provs/framework/ubuntu/firewall/ProvisionFirewallKtTest.kt @@ -1,4 +1,4 @@ -package org.domaindrivenarchitecture.provs.framework.extensions.server_software.standalone_server.firewall +package org.domaindrivenarchitecture.provs.framework.ubuntu.firewall import org.domaindrivenarchitecture.provs.framework.core.Prov import org.domaindrivenarchitecture.provs.framework.core.docker.dockerProvideImage