Skip to content

Commit

Permalink
Support systemd status to return 0 exit code when status OK Symantec#4
Browse files Browse the repository at this point in the history
  • Loading branch information
seglo committed Jun 6, 2016
1 parent 75d2496 commit e58edd4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion package/scripts/cassandra_master.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,12 @@ def start(self, env):
def status(self, env):
import params
env.set_params(params)
status_cmd = format("service cassandra status")
status_cmd = format("""
if hash systemctl 2>/dev/null; then
systemctl status cassandra
else
service cassandra status
fi""")
Execute(status_cmd)
print 'Status of the Master'

Expand Down

0 comments on commit e58edd4

Please sign in to comment.