Permalink
Browse files

Update Apache2 Config for NEMS 1.5

  • Loading branch information...
NEMS Linux
NEMS Linux committed Jan 22, 2019
1 parent a84d728 commit 7e237ddb794b89f2a1ffde465dae741cad75c62f
Showing with 23 additions and 6 deletions.
  1. +14 −1 build/035-apache2
  2. +9 −5 nems-upgrade/1.4.1-1.5
@@ -1,16 +1,29 @@
#!/bin/bash

if [[ $ver == '' ]]; then
if [[ -e /usr/local/bin/nems-info ]]; then
ver=$(/usr/local/bin/nems-info nemsver)
else
ver='UNKNOWN'
fi
fi

a2enmod ssl
apt -y install ssl-cert libapache2-mod-security2

# Generating new Snakeoil cert
/usr/sbin/make-ssl-cert generate-default-snakeoil --force-overwrite

systemctl stop apache2
cp -f /root/nems/nems-migrator/data/apache2/sites-available/000-default.conf /etc/apache2/sites-available
cp -f /root/nems/nems-migrator/data/1.5/apache2/sites-available/nems-dashboard.conf /etc/apache2/sites-available

a2dissite 000-default
a2ensite nems-dashboard

# Change Apache footer
a2enmod security2
a2enconf security
/bin/sed -i~ '/SecServerSignature/d' /etc/apache2/conf-available/security.conf
echo "SecServerSignature NEMS_Linux/$ver" >> /etc/apache2/conf-available/security.conf

systemctl start apache2
@@ -32,12 +32,15 @@ if [[ "$ver" == "1.4.1" ]]; then
fi
ln -s /var/www/html/share/nagios/ /usr/local/nagios/share

# Install nagiosgraph
/root/nems/nems-admin/build/051-nagiosgraph
## Configure Apache2
/root/nems/nems-admin/build/035-apache2

## Install PHPMailer
/root/nems/nems-admin/build/040-phpmailer

## Install nagiosgraph
/root/nems/nems-admin/build/051-nagiosgraph

## Compile nagios-plugins
/root/nems/nems-admin/build/051-nagios-plugins

@@ -53,18 +56,19 @@ if [[ "$ver" == "1.4.1" ]]; then
## Recompile WMIC based on nems-wmic
/root/nems/nems-admin/build/055-wmic

## Install MOTD
/root/nems/nems-admin/build/230-motd

## Configure samba
/root/nems/nems-admin/build/155-samba

## ODROID XU4 changes in 1.5
/root/nems/nems-admin/build/160-odroid-xu4

## Install MOTD
/root/nems/nems-admin/build/230-motd

## Change dpkg vendor name (Seen with dpkg-vendor --query Vendor)
/root/nems/nems-admin/build/235-dpkg-vendor


else
echo "Cannot uprade NEMS $ver to 1.5."
fi

0 comments on commit 7e237dd

Please sign in to comment.