Permalink
Browse files

Reload config after upgrade, newer livestatus

  • Loading branch information...
NEMS Linux
NEMS Linux committed Oct 29, 2018
1 parent 82b19b1 commit ac0aec90155fe4bcc34da46d0fa3c85f31f5896f
Showing with 21 additions and 6 deletions.
  1. +14 −5 build/055-check_mk
  2. +7 −1 nems-upgrade/1.4.1-1.5
@@ -1,15 +1,23 @@
#!/bin/bash
# Once GCC 7 is available upstream, we can upgrade to 1.5, which requires C++17 to compile.
# Install and configure check-mk-livestatus
apt install --yes php-net-socket php7.2-sqlite3 sqlite3 graphviz php7.2-gd rrdtool librrd-dev libboost-all-dev libncurses5-dev libreadline-dev libxml2-dev libssl-dev
# This is the full Check_MK OSE bundle
# 1.4.0p31
wget -O /tmp/mk.tar.gz --no-check-certificate https://mathias-kettner.de/support/1.4.0p31/check_mk-1.4.0p31.tar.gz
cd /tmp
tar xzf mk.tar.gz
cd check_mk-1.4.0p31
# NEMS 1.4.1 - 1.4.0p31
# wget -O /tmp/mk.tar.gz --no-check-certificate https://mathias-kettner.de/support/1.4.0p31/check_mk-1.4.0p31.tar.gz
# cd /tmp
# tar xzf mk.tar.gz
# cd check_mk-1.4.0p31
# NEMS 1.5 - 1.4.0p37
wget -O /tmp/mk.tar.gz --no-check-certificate https://mathias-kettner.de/support/1.4.0p37/check_mk-1.4.0p37.tar.gz
cd /tmp
tar xzf mk.tar.gz
cd check_mk-1.4.0p37
# Install livestatus
# Need to determine the lib directory for boost to compile correctly
@@ -26,6 +34,7 @@ elif [[ -d /usr/lib/aarch64-linux-gnu ]]; then
# Pine A64+ aarch64
libdir=/usr/lib/aarch64-linux-gnu
fi
mkdir livestatus
cd livestatus
tar xzf ../livestatus.tar.gz
@@ -19,14 +19,20 @@ if [[ "$ver" == "1.4.1" ]]; then
## Upgrade Nagios to from 4.3.4 to 4.4.2
if [[ -d /tmp/libexec ]]; then rm -rf /tmp/libexec; fi
mv /usr/local/nagios/libexec /tmp/ && rm -rf /usr/local/nagios/ && /nems/nems-admin/build/050-nagios && systemctl stop nagios && rm -rf /usr/local/nagios/libexec && mv /tmp/libexec /usr/local/nagios/ && systemctl start nagios
mv /usr/local/nagios/libexec /tmp/ && rm -rf /usr/local/nagios/ && /root/nems/nems-admin/build/050-nagios && systemctl stop nagios && rm -rf /usr/local/nagios/libexec && mv /tmp/libexec /usr/local/nagios/ && systemctl start nagios
## Install PHPMailer
/root/nems/nems-admin/build/040-phpmailer
## Install NEMS Nagios Plugins
/root/nems/nems-admin/build/052-nems-nagios-plugins
## Reload config files
/root/nems/nems-admin/build/053-nagios-confs
## Recompile livestatus with Nagios 4.4.2
/root/nems/nems-admin/build/055-check_mk
else
echo "Cannot uprade NEMS $ver to 1.5."
fi

0 comments on commit ac0aec9

Please sign in to comment.