diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-06 21:01:33 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2021-01-06 21:01:33 +0100 |
commit | ede2372547db659e7b0e9cfd3b531ff542018229 (patch) | |
tree | 433dcb7d2bf84c6cc0ee30d92c32c6220dc53641 /module/ri-engine/src/main/resources/io/trygvis | |
parent | 149cf9efadb1da64b9ee716ac9bee1ac0c0e1329 (diff) | |
download | rules-sandbox-ede2372547db659e7b0e9cfd3b531ff542018229.tar.gz rules-sandbox-ede2372547db659e7b0e9cfd3b531ff542018229.tar.bz2 rules-sandbox-ede2372547db659e7b0e9cfd3b531ff542018229.tar.xz rules-sandbox-ede2372547db659e7b0e9cfd3b531ff542018229.zip |
Generating Wireguard files too.
Diffstat (limited to 'module/ri-engine/src/main/resources/io/trygvis')
-rw-r--r-- | module/ri-engine/src/main/resources/io/trygvis/rules/engine/init.drl (renamed from module/ri-engine/src/main/resources/io/trygvis/rules/engine/default.drl) | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/ri-engine/src/main/resources/io/trygvis/rules/engine/default.drl b/module/ri-engine/src/main/resources/io/trygvis/rules/engine/init.drl index a933bd9..267cc4a 100644 --- a/module/ri-engine/src/main/resources/io/trygvis/rules/engine/default.drl +++ b/module/ri-engine/src/main/resources/io/trygvis/rules/engine/init.drl @@ -5,12 +5,13 @@ import org.apache.commons.io.FileSystem import org.apache.commons.io.FileUtils import java.io.File +global io.trygvis.rules.engine.TemplateEngine te; + rule "Clean directories" agenda-group "init" when not(KeyValue(key == "rm-gen")); then - System.out.println("Cleaning gen!"); - FileUtils.deleteDirectory(new File("gen")); + te.clean(); insert(new KeyValue("rm-gen", null)); end |