Skip to content
Permalink
Browse files

echo build progress to index

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 19, 2019
1 parent a314533 commit 5e859a1c4c67fbc2668a329fb9e9354e97a64040
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
cd /root/nems # this was created with nems-prep.sh

if [[ ! -d nems-migrator ]]; then
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

if [[ ! -d /usr/local/share/nems ]]; then
mkdir /usr/local/share/nems
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Ping is missing from Pine64.
apt -y install iputils-ping
@@ -2,6 +2,8 @@
# This fixes hostname errors on Debian Stretch for ODROID XU4 (and possibly others)
# Where a 127.0.1.1 host entry is missing from the default OS.

echo $0 > /var/www/html/index.html

hn=$(/bin/hostname)
printf "Ensuring Hostname is Setup Correctly... "

@@ -1,6 +1,8 @@
#!/bin/bash
# Replace the screen with our bootscreen which shows some basic info to the user (like how to connect)

echo $0 > /var/www/html/index.html

apt install -y dialog

# Disable TTY1
@@ -2,6 +2,8 @@

# Perform some additional TTY setup without manipulating the splash (010-tty)

echo $0 > /var/www/html/index.html

if [[ ! -f /etc/rc.local ]]; then
echo "#!/bin/sh -e
" > /etc/rc.local
@@ -2,6 +2,8 @@

# Don't output kernel messages (such as firewall blocks) to TTY

echo $0 > /var/www/html/index.html

if [[ ! -f /etc/rc.local ]]; then
echo "#!/bin/sh -e
" > /etc/rc.local
@@ -1,3 +1,4 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
echo "Reloading Daemon"
systemctl daemon-reload
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

if [[ -d /boot/grub/ ]]; then
# Determine the platform
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
apt update
apt -y install unattended-upgrades apt-listchanges

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

## Install CSF/LFD
cd /usr/src
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

## Add our default configuration
cp -f /root/nems/nems-migrator/data/1.5/csf/* /etc/csf/
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Create nemsadmin user
adduser --disabled-password --gecos "" nemsadmin
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

if [[ $ver == '' ]]; then
if [[ -e /usr/local/bin/nems-info ]]; then
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Get the platform before removing php (as it requires PHP)
platform=$(/usr/local/bin/nems-info platform)
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
cd /var/www/
if [[ -d PHPMailer ]]; then
rm -Rf PHPMailer
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Delete the symlink to nems-www theme before installing (prevent overwrite)
if [[ -L /usr/local/nagios/share ]]; then
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# This script is run during initial NEMS compile, but because sometimes #
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Dependencies
# CISCO
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

if [[ ! -d /var/log/nagios ]]; then
mkdir /var/log/nagios
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

a2enmod rewrite
a2enmod cgi
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
# Thanks to Ryan Siegel for the contribution on NEMS 1.2.1
# Updated for NEMS 1.5 since openvas stopped distributing the package

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# The conf gets imported by nems-init, so only need to install.

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
#apt-key adv --recv --keyserver hkp://keyserver.ubuntu.com 1148DA8E
#echo 'deb https://packages.openitcockpit.com/repositories/stretch stretch main' > /etc/apt/sources.list.d/openitcockpit.list
#apt update
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Add and configure NEMS packages

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
# https://raymii.org/s/tutorials/Nagios_Core_4_Installation_on_Ubuntu_12.04.html
# https://ahmermansoor.blogspot.com/2016/09/install-configure-nagiosgraph-on-nagios.html
# *** https://www.allcloud.io/how-to/install-nagiosgraph/ ***
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Replace the database with Sample database
systemctl stop mysql
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
systemctl stop smbd
cp /root/nems/nems-migrator/data/1.5/samba/smb.conf /etc/samba/
init=$(/usr/local/bin/nems-info init)
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# This is for the Pine A64+

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

platform=$(/usr/local/bin/nems-info platform)

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# This is for the Pine A64+

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# The Rock64 platform requires some extra fandangling to resize the filesystem
# Thanks to Ayufan for doing all the legwork... I'd have scratched my head a while.
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

printf "Installing raspi-config... "
platform=$(/usr/local/share/nems/nems-scripts/info.sh platform) # This is why we have to do this after 150-nems
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

platform=$(/usr/local/bin/nems-info platform)

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

printf "Installing rpimonitor... "
platform=$(/usr/local/share/nems/nems-scripts/info.sh platform) # This is why we have to do this after 150-nems
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

if [[ -d /usr/lib/aarch64-linux-gnu ]]; then
# On aarch64 (eg., Pine64), luajit can't be installed by apt,
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Set the URL of the latest debpack from https://www.monitorix.org/downloads.html
debpack=https://www.monitorix.org/monitorix_3.10.1-izzy1_all.deb
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

platform=$(/usr/local/bin/nems-info platform)
if [[ $platform = "0" ]] ||
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

## Remove Cockpit theme and replace with symlink to the NEMS theme

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Fix the cert bug in 5.20
# It seems this has been patched upstream, so can comment this out - but leaving until confirmed
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Prepare sudo permissions
if ! grep -q "# Adagios" /etc/sudoers; then
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Set Network Manager WiFi MAC address to not change on boot

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
hn=$(/bin/hostname)
printf "Changing Hostname... "
/bin/sed -i -- 's/'"$hn"'/nems/g' /etc/hosts
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
apt -y remove --purge webmin
if [[ -e /webmin-setup.out ]]; then
rm /webmin-setup.out
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html

# Quick cheat to avoid errors if no files exist
touch /etc/update-motd.d/dummy
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /var/www/html/index.html
echo "Vendor: NEMS_Linux
Vendor-URL: https://nemslinux.com/
Bugs: http://forum.category5.tv/forum-38.html

0 comments on commit 5e859a1

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