diff --git a/.gitignore b/.gitignore index 57aa8e8..81ac32d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ /dist examples/mittnite.d/local.hcl cmd/mittnitectl/mittnitectl +*.log diff --git a/examples/bootjob.d/one_shot.hcl b/examples/bootjob.d/one_shot.hcl deleted file mode 100644 index 301173c..0000000 --- a/examples/bootjob.d/one_shot.hcl +++ /dev/null @@ -1,25 +0,0 @@ -boot "oneshotzero" { - command = "/bin/bash" - args = [ - "examples/bootjob.d/job2.sh" - ] -} - -boot "oneshot" { - command = "/bin/bash" - args = [ - "examples/bootjob.d/job.sh" - ] -} - -job "memes" { - command = "/bin/bash" - args = [ - "-c", - "while true ; do echo 'memes'; sleep 10; done" - ] - - stdout = "memes.log" - stdout = "memes_error.log" - enableTimestamps = true -} \ No newline at end of file diff --git a/examples/bootjob.d/job.sh b/examples/oneshots.d/job.sh similarity index 100% rename from examples/bootjob.d/job.sh rename to examples/oneshots.d/job.sh diff --git a/examples/bootjob.d/job2.sh b/examples/oneshots.d/job2.sh similarity index 100% rename from examples/bootjob.d/job2.sh rename to examples/oneshots.d/job2.sh diff --git a/examples/oneshots.d/one_shot.hcl b/examples/oneshots.d/one_shot.hcl new file mode 100644 index 0000000..5ff2141 --- /dev/null +++ b/examples/oneshots.d/one_shot.hcl @@ -0,0 +1,13 @@ +boot "oneshot" { + command = "/bin/bash" + args = [ + "examples/bootjob.d/job.sh" + ] +} + +boot "oneshot_two" { + command = "/bin/bash" + args = [ + "examples/bootjob.d/job2.sh" + ] +} diff --git a/examples/timestamps.d/timestamps.hcl b/examples/timestamps.d/timestamps.hcl new file mode 100644 index 0000000..cb98ae1 --- /dev/null +++ b/examples/timestamps.d/timestamps.hcl @@ -0,0 +1,11 @@ +job "echoloop" { + command = "/bin/bash" + args = [ + "-c", + "while true ; do echo 'test'; sleep 10; done" + ] + + stdout = "test.log" + stdout = "test_error.log" + enableTimestamps = true +} \ No newline at end of file