Skip to content

Commit

Permalink
corrected service condition
Browse files Browse the repository at this point in the history
  • Loading branch information
bcoca committed Jan 9, 2017
1 parent d9b89ca commit afbe3bd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,10 @@ endif

ifeq ($(shell echo $(OS) | egrep -c 'Darwin|FreeBSD|OpenBSD|DragonFly'),1)
DATE := $(shell date -j -r $(shell git log -n 1 --format="%at") +%Y%m%d%H%M)
CPUS := $(shell sysctl hw.ncpu|awk '{print $2}')
else
DATE := $(shell date --utc --date="$(GIT_DATE)" +%Y%m%d%H%M)
CPUS := $(shell nproc)
endif

# DEB build parameters
Expand Down
2 changes: 1 addition & 1 deletion lib/ansible/modules/system/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,7 +626,7 @@ def get_service_status(self):
if "stop" in cleanout:
self.running = False
elif "run" in cleanout:
self.running = ("not " in cleanout)
self.running = not ("not " in cleanout)
elif "start" in cleanout and "not " not in cleanout:
self.running = True
elif 'could not access pid file' in cleanout:
Expand Down

0 comments on commit afbe3bd

Please sign in to comment.