Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/nextcloudpi.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornachoparker <nacho@ownyourbits.com>2018-04-24 18:53:03 +0300
committernachoparker <nacho@ownyourbits.com>2018-04-24 18:53:03 +0300
commitfe38cd5eb2f8c9078247f36b034826058673f78e (patch)
treec37f6b16d6ffd825c4ef97d72499c2b7123d5837
parent879b8a4ba3c5ebb42e4693285ea5b047cbbdefd2 (diff)
armbian: fix nc-audit messing up with build process
-rw-r--r--etc/ncp-config.d/nc-audit.sh8
-rw-r--r--install.sh2
-rw-r--r--nextcloudplus.sh4
3 files changed, 8 insertions, 6 deletions
diff --git a/etc/ncp-config.d/nc-audit.sh b/etc/ncp-config.d/nc-audit.sh
index 69f21b0c..12bc46a7 100644
--- a/etc/ncp-config.d/nc-audit.sh
+++ b/etc/ncp-config.d/nc-audit.sh
@@ -16,8 +16,10 @@
DESCRIPTION="Perform a security audit with lynis and debsecan"
-install()
+configure()
{
+ # moved installation here, because it is messing up the environment
+ type lynis &>/dev/null || {
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
lynis debian-goodies needrestart debsums debsecan
@@ -65,8 +67,6 @@ skip-test=FIRE-4513
EOF
}
-configure()
-{
echo "General security audit"
lynis audit system --profile /etc/lynis/ncp.prf --no-colors
@@ -74,6 +74,8 @@ configure()
debsecan
}
+install() { :; };
+
# License
#
# This script is free software; you can redistribute it and/or modify it
diff --git a/install.sh b/install.sh
index a8b96960..4cd5dbcf 100644
--- a/install.sh
+++ b/install.sh
@@ -10,7 +10,7 @@
# more details at https://ownyourbits.com
BRANCH=master
-DBG=x
+#DBG=x
set -e$DBG
diff --git a/nextcloudplus.sh b/nextcloudplus.sh
index 16775cf6..6a5380f5 100644
--- a/nextcloudplus.sh
+++ b/nextcloudplus.sh
@@ -221,7 +221,7 @@ EOF
echo "NextCloudPlus_$( date "+%m-%d-%y" )" > /usr/local/etc/ncp-baseimage
## SSH hardening
- [[ -f /etc/ssh/sshd_config ]] && {
+ if [[ -f /etc/ssh/sshd_config ]]; then
sed -i 's|^#AllowTcpForwarding .*|AllowTcpForwarding no|' /etc/ssh/sshd_config
sed -i 's|^#ClientAliveCountMax .*|ClientAliveCountMax 2|' /etc/ssh/sshd_config
sed -i 's|^MaxAuthTries .*|MaxAuthTries 1|' /etc/ssh/sshd_config
@@ -232,7 +232,7 @@ EOF
sed -i 's|^#Compression .*|Compression no|' /etc/ssh/sshd_config
sed -i 's|^#AllowAgentForwarding .*|AllowAgentForwarding no|' /etc/ssh/sshd_config
sed -i 's|^#PermitRootLogin .*|PermitRootLogin no|' /etc/ssh/sshd_config
- }
+ fi
## kernel hardening
cat >> /etc/sysctl.conf <<EOF