From: Gunnar Beutner Date: Fri, 27 Jun 2014 11:27:43 +0000 (+0200) Subject: Fix compatibility issue with base64 on CentOS 5 X-Git-Tag: v2.0.1~21 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=530962940350b8e79769a4ae998164576a9e3daf;p=icinga2 Fix compatibility issue with base64 on CentOS 5 fixes #6373 --- diff --git a/contrib/icinga2-setup-agent.cmake b/contrib/icinga2-setup-agent.cmake index 388109a65..08a6adb95 100644 --- a/contrib/icinga2-setup-agent.cmake +++ b/contrib/icinga2-setup-agent.cmake @@ -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..."