Skip to content

Commit

Permalink
Merge pull request #67 from ContainerSolutions/fix/commands
Browse files Browse the repository at this point in the history
Fixing commands
  • Loading branch information
gusfcarvalho authored Jul 21, 2023
2 parents 388a090 + 5642149 commit af62669
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion operator/config/samples/command.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@ metadata:
spec:
type: command
providerConfig:
cmd: "/scripts/pexpect_example.py"
cmd: "/scripts/nsswitch.py"
expectedStatusCode: "0"
1 change: 1 addition & 0 deletions operator/scripts/nginx.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#! /usr/bin/env python
import pexpect
import sys
import os
Expand Down
2 changes: 1 addition & 1 deletion operator/scripts/nsswitch.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def remove_cr(string):
output=s.before.decode('utf-8').split('\n')
line=remove_ansi_escape_sequences(output[1].strip())
line=remove_cr(line)
if line != '0666':
if line == '644':
sys.exit(0)
else:
sys.exit(1)

0 comments on commit af62669

Please sign in to comment.