Fix compatibility issue with base64 on CentOS 5

fixes #6373
This commit is contained in:
Gunnar Beutner 2014-06-27 13:27:43 +02:00
parent 77747d0d87
commit 5309629403
1 changed files with 2 additions and 2 deletions

View File

@ -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
@ -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..."