Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Protect nems-www theme
  • Loading branch information
NEMS Linux committed Feb 6, 2019
1 parent 1c88424 commit 11ee91d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions build/050-nagios
@@ -1,5 +1,10 @@
#!/bin/bash

# Delete the symlink to nems-www theme before installing (prevent overwrite)
if [[ -L /usr/local/nagios/share ]]; then
rm -f /usr/local/nagios/share
fi

# Install Nagios Core
useradd nagios
groupadd nagcmd
Expand All @@ -25,6 +30,15 @@

systemctl stop nagios
cp -f /root/nems/nems-migrator/data/1.5/nagios/etc/nagios.cfg /usr/local/nagios/etc/

# Restore nems-www theme
if [[ -d /usr/local/nagios/share ]]; then
rm -rf /usr/local/nagios/share
fi
if [[ ! -e /usr/local/nagios/share ]]; then
ln -s /var/www/html/share/nagios /usr/local/nagios/share
fi

systemctl start nagios

# Finished installing Nagios Core
Expand Down

0 comments on commit 11ee91d

Please sign in to comment.