Skip to content
Permalink
Browse files

Begin implementing progress in build

  • Loading branch information...
NEMS Linux
NEMS Linux committed Feb 23, 2019
1 parent e410e40 commit 9f3c800f7aa2a99d66d4039d39c8c0333bc7a1bb
@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# Ensure git is installed before proceeding with build

if [[ ! -e /usr/bin/git ]]; then
@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

cd /root/nems # this was created with nems-prep.sh

if [[ ! -d nems-migrator ]]; then
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

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

# Ping is missing from Pine64.
apt -y install iputils-ping
@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# 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.

@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# Replace the screen with our bootscreen which shows some basic info to the user (like how to connect)

apt install -y dialog
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

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

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

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

@@ -1,3 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

echo "Reloading Daemon"
systemctl daemon-reload
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

if [[ -d /boot/grub/ ]]; then
# Determine the platform
@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

apt update
apt -y install unattended-upgrades apt-listchanges

@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# Not yet functional in buster
exit
## Install CSF/LFD
@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# not yet functional in buster
exit
## Add our default configuration
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# Create nemsadmin user
adduser --disabled-password --gecos "" nemsadmin
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# Web Interface
cd /var/www
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

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

# Get the platform before removing php (as it requires PHP)
platform=$(/usr/local/bin/nems-info platform)
@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

cd /var/www/
if [[ -d PHPMailer ]]; then
rm -Rf PHPMailer
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur
# 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 > /tmp/nems-build.cur

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

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur
#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 > /tmp/nems-build.cur

# Add and configure NEMS packages

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur
# 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 > /tmp/nems-build.cur

# Replace the database with Sample database
systemctl stop mysql
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur
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 > /tmp/nems-build.cur

# This is for the Pine A64+

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

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

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# This is for the Pine A64+

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# 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 > /tmp/nems-build.cur

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 > /tmp/nems-build.cur

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

@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

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 > /tmp/nems-build.cur

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 > /tmp/nems-build.cur

# 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 > /tmp/nems-build.cur

# POSSIBLY move to self-compile
# https://tech.maweki.de/installing-cockpit-on-raspbian.html
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

## Remove Cockpit theme and replace with symlink to the NEMS theme
platform=$(/usr/local/bin/nems-info platform)
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# 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 > /tmp/nems-build.cur

# Prepare sudo permissions
if ! grep -q "# Adagios" /etc/sudoers; then
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

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

@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

hn=$(/bin/hostname)
printf "Changing Hostname... "
/bin/sed -i -- 's/'"$hn"'/nems/g' /etc/hosts
@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

apt -y remove --purge webmin
if [[ -e /webmin-setup.out ]]; then
rm /webmin-setup.out
@@ -1,4 +1,5 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

# Quick cheat to avoid errors if no files exist
touch /etc/update-motd.d/dummy
@@ -1,4 +1,6 @@
#!/bin/bash
echo $0 > /tmp/nems-build.cur

echo "Vendor: NEMS_Linux
Vendor-URL: https://nemslinux.com/
Bugs: http://forum.category5.tv/forum-38.html

0 comments on commit 9f3c800

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