Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command service type for running a command and checking exit code, stdout and stderr #284

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

AoiKuiyuyou
Copy link

The command service's config format:

{
  "Cmd": "_CMD_PATH_(required)",
  "Args": [_ARGS_LIST_(optional)],
  "Dir": "_DIR_PATH_(optional)",
  "Env": {_ENV_VARS_MAP_(optional)},
  "Stdin": "_STDIN_STR_(optional)",
  "Stdout": "_STDOUT_REGEX_(optional)",
  "Stderr": "_STDERR_REGEX_(optional)"
}

Example:

{
  "Cmd": "/usr/bin/ping",
  "Args": ["-c", "1", "-W", "1", "example.com"],
  "Stdout": ".+1 received.+"
}

Example:

{
  "Cmd": "/bin/bash",
  "Args": ["-c", "/usr/bin/ping -c 1 -W 1 example.com"]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant