Skip to content

Commit

Permalink
Merge pull request #1501 from ddpbsd/1499_status
Browse files Browse the repository at this point in the history
Modify status() to not return 1 when maild is not running
  • Loading branch information
atomicturtle authored Aug 14, 2018
2 parents 74a505a + d09933c commit 1740575
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/init/ossec-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@ status()
{
RETVAL=0
for i in ${DAEMONS}; do
## If ossec-maild is disabled, don't try to start it.
if [ X"$i" = "Xossec-maild" ]; then
grep "<email_notification>no<" ${DIR}/etc/ossec.conf >/dev/null 2>&1
if [ $? = 0 ]; then
continue
fi
fi

pstatus ${i};
if [ $? = 0 ]; then
echo "${i} not running..."
Expand Down

0 comments on commit 1740575

Please sign in to comment.