Skip to content

Commit

Permalink
Merge pull request #2167 from wazuh/dev-16749-remove-dbsync-deadcode
Browse files Browse the repository at this point in the history
Backporting fixes from 4.4 to 4.3
  • Loading branch information
DFolchA authored Apr 19, 2023
2 parents 7feb901 + 7f7bc0a commit 13e404b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions solaris/solaris10/postremove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
# postremove script for wazuh-agent
# Wazuh, Inc 2015

if getent passwd wazuh; then
if getent passwd wazuh > /dev/null 2>&1; then
userdel wazuh
fi

if getent group wazuh; then
if getent group wazuh > /dev/null 2>&1; then
groupdel wazuh
fi
8 changes: 4 additions & 4 deletions solaris/solaris10/preinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ if [ ! -f ${OSMYSHELL} ]; then
fi
fi

getent group | grep "^wazuh"
if [ "$?" -eq 1 ]; then
getent group wazuh > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
groupadd ${GROUP}
fi

getent passwd wazuh
if [ "$?" -eq 1 ]; then
getent passwd wazuh > /dev/null 2>&1
if [ "$?" -ne 0 ]; then
useradd -d ${DIR} -s ${OSMYSHELL} -g ${GROUP} ${USER} > /dev/null 2>&1
fi

Expand Down

0 comments on commit 13e404b

Please sign in to comment.