Skip to content
Permalink
Browse files

Re-order precache

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 28, 2019
1 parent daa7090 commit d8e8b87146b2603ab08a17e9a05cf74a5edeae06
Showing with 17 additions and 4 deletions.
  1. +2 −3 build/050-nagios
  2. +0 −1 build/053-nagios-confs
  3. +15 −0 build/055-nagios-precache
@@ -17,6 +17,7 @@ fi
if [[ ! -e /var/lib/nagios/ ]]; then
mkdir /var/lib/nagios/
chown -R nagios:nagios /var/lib/nagios/
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios
fi

cd /tmp
@@ -61,10 +62,8 @@ usermod -s /bin/bash nagios
if [[ ! -e /var/lib/nagios/ ]]; then
mkdir /var/lib/nagios/
chown -R nagios:nagios /var/lib/nagios/
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios
fi

# Create precache file for NEMS Mobile UI in /var/lib/nagios
/usr/local/nagios/bin/nagios -pv /usr/local/nagios/etc/nagios.cfg

# Reload daemon units in case Nagios was running while updated
systemctl daemon-reload
@@ -40,7 +40,6 @@ fi
# Change some permissions changes
systemctl stop apache2
dpkg-statoverride --update --add nagios www-data 2710 /usr/local/nagios/var/rw
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios
cp -f /root/nems/nems-migrator/data/1.4/apache2/conf-available/nagios.conf /etc/apache2/conf-available/
systemctl start apache2

@@ -0,0 +1,15 @@
#!/bin/bash
echo $0 > /var/www/html/userfiles/nems-build.cur

systemctl stop nagios

if [[ ! -e /var/lib/nagios/ ]]; then
mkdir /var/lib/nagios/
chown -R nagios:nagios /var/lib/nagios/
dpkg-statoverride --update --add nagios nagios 751 /var/lib/nagios
fi

# Create precache file for NEMS Mobile UI in /var/lib/nagios
/usr/local/nagios/bin/nagios -pv /usr/local/nagios/etc/nagios.cfg

systemctl start nagios

0 comments on commit d8e8b87

Please sign in to comment.
You can’t perform that action at this time.