Skip to content

Commit

Permalink
RANGER-2685 : check if there are files in ews/logs
Browse files Browse the repository at this point in the history
Signed-off-by: Pradeep <pradeep@apache.org>
  • Loading branch information
liujiayi771 authored and pradeepagrawal8184 committed Jan 16, 2020
1 parent 7cfef39 commit 3e5ccd6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion security-admin/scripts/set_globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,9 @@ ln -sf /etc/ranger/admin/conf ews/webapp/WEB-INF/classes/conf
if [ ! -d /var/log/ranger/admin ]; then
mkdir -p /var/log/ranger/admin
if [ -d ews/logs ]; then
cp -r ews/logs/* /var/log/ranger/admin
if [ -n "$(ls ews/logs/ 2>/dev/null)" ]; then
cp -r ews/logs/* /var/log/ranger/admin
fi
fi
fi

Expand Down
4 changes: 3 additions & 1 deletion unixauthservice/scripts/set_globals.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,9 @@ ln -sf /etc/ranger/usersync/conf conf
if [ ! -d /var/log/ranger/usersync ]; then
mkdir -p /var/log/ranger/usersync
if [ -d ews/logs ]; then
cp -r ews/logs/* /var/log/ranger/usersync
if [ -n "$(ls ews/logs/ 2>/dev/null)" ]; then
cp -r ews/logs/* /var/log/ranger/usersync
fi
fi
fi

Expand Down

0 comments on commit 3e5ccd6

Please sign in to comment.