Skip to content

Commit

Permalink
Fix compatibility issue with base64 on CentOS 5
Browse files Browse the repository at this point in the history
fixes #6373
  • Loading branch information
gunnarbeutner committed Jun 27, 2014
1 parent 77747d0 commit 5309629
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions contrib/icinga2-setup-agent.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if [ -n "$1" ]; then
exit 1
fi

if ! base64 -d $1 >/dev/null 2>&1; then
if ! base64 -i -d $1 | tar ztf >/dev/null 2>&1; then
echo "The bundle file is invalid or corrupted."
exit 1
fi
Expand Down Expand Up @@ -114,7 +114,7 @@ if [ -n "$1" ]; then
fi

echo "Installing the certificate bundle..."
base64 -d < $1 | tar -C $ICINGA2CONFIG/pki/ -zx || exit 1
base64 -i -d < $1 | tar -C $ICINGA2CONFIG/pki/ -zx || exit 1
chown @ICINGA2_USER@:@ICINGA2_GROUP@ $ICINGA2CONFIG/pki/* || exit 1

echo "Setting up api.conf..."
Expand Down

0 comments on commit 5309629

Please sign in to comment.