blob: 67c93f22fc1ff345a282bb250ac8ea1e0025d73f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
#!/bin/bash
#--------------------
#Testing for correct version
#--------------------
set -e
PACKAGE_VERSION="$(dpkg-parsechangelog -S Version |sed -ne 's/^\(\([0-9]\+\):\)\?\(.*\)-.*/\3/p' )"
ICINGA_VERSION="$(icinga2 --version | grep version: | head -n1 | sed -e 's/.*version: r\([0-9.]\+\).*$/\1/')"
if [ "$ICINGA_VERSION" = "$PACKAGE_VERSION" ]
then
echo "OK: $ICINGA_VERSION is equal to $PACKAGE_VERSION"
exit 0
else
echo "ERROR: $ICINGA_VERSION is not equal to $PACKAGE_VERSION"
exit 1
fi
|