SidorkinAlex / CyclicCommandCheckerAndExecutive

MIT License
6 stars 1 forks source link

Add #1

Open SidorkinAlex opened 4 days ago

SidorkinAlex commented 4 days ago

add various matching conditions to check the result of executing a controlled command, for example, entering a string, converting to the int type and checking for longer or less

SidorkinAlex commented 4 days ago
[
  {
    "checkingCommand": "cat /path/to/your/file.txt | tr -d '\n'",
    "interval": 5,
    "branchCommand": [
      {
        "resultExecution": "success",
        "typeOfMatch":"equival | not_equival | included_in_substring | more | less"
        "commands": [
          "echo 'Command executed successfully.'",
          "echo '' > /path/to/your/file.txt"
        ]
      },
      {
        "resultExecution": "failure",
        "commands": [
          "bash command 1",
          "bash command 2"
        ]
      }
    ]
  }
]