diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-06 15:20:40 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-06 15:21:16 +0100 |
commit | e84ef1adb8ff0d3b121ea12b2d3e15fa52eb2f00 (patch) | |
tree | afb7c00c654c122a313acaba8630708a87ae4ffd /module/acme/src/main/java/io | |
parent | 9504c7efb9b57aeacf5e2717a43c3cf178a65aee (diff) | |
download | rules-sandbox-e84ef1adb8ff0d3b121ea12b2d3e15fa52eb2f00.tar.gz rules-sandbox-e84ef1adb8ff0d3b121ea12b2d3e15fa52eb2f00.tar.bz2 rules-sandbox-e84ef1adb8ff0d3b121ea12b2d3e15fa52eb2f00.tar.xz rules-sandbox-e84ef1adb8ff0d3b121ea12b2d3e15fa52eb2f00.zip |
Splitting Main into two runs, Vpn and AcmeApps.
Diffstat (limited to 'module/acme/src/main/java/io')
-rw-r--r-- | module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java | 13 | ||||
-rw-r--r-- | module/acme/src/main/java/io/trygvis/acme/VpnMain.java | 6 |
2 files changed, 15 insertions, 4 deletions
diff --git a/module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java b/module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java new file mode 100644 index 0000000..f21ebc3 --- /dev/null +++ b/module/acme/src/main/java/io/trygvis/acme/AcmeAppsMain.java @@ -0,0 +1,13 @@ +package io.trygvis.acme; + +import io.trygvis.rules.engine.Engine; + +import java.io.IOException; + +public class AcmeAppsMain { + public static void main(String[] args) throws IOException { + try (var engine = new Engine("acme-apps", "acme.yaml")) { + engine.io.dump("acme/apps", engine.session.getFactHandles()); + } + } +} diff --git a/module/acme/src/main/java/io/trygvis/acme/VpnMain.java b/module/acme/src/main/java/io/trygvis/acme/VpnMain.java index d5f986d..d6c8061 100644 --- a/module/acme/src/main/java/io/trygvis/acme/VpnMain.java +++ b/module/acme/src/main/java/io/trygvis/acme/VpnMain.java @@ -10,10 +10,8 @@ import java.io.IOException; public class VpnMain { public static void main(String[] args) throws IOException { - try (var engine = new Engine("acme.yaml")) { - engine.io.dump("phase-1", engine.session.getFactHandles()); - - engine.io.dump("vpn0", engine.session.getFactHandles(), (Object o) -> + try (var engine = new Engine("acme-wireguard", "acme.yaml")) { + engine.io.dump("acme/wireguard", engine.session.getFactHandles(), (Object o) -> o.getClass().getName().contains("Wg") || o instanceof Machine || o instanceof DnsEntry |