mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
armbian: fix nc-audit messing up with build process
This commit is contained in:
parent
879b8a4ba3
commit
fe38cd5eb2
@ -16,8 +16,10 @@
|
|||||||
|
|
||||||
DESCRIPTION="Perform a security audit with lynis and debsecan"
|
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
|
apt-get update
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
||||||
lynis debian-goodies needrestart debsums debsecan
|
lynis debian-goodies needrestart debsums debsecan
|
||||||
@ -65,8 +67,6 @@ skip-test=FIRE-4513
|
|||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
configure()
|
|
||||||
{
|
|
||||||
echo "General security audit"
|
echo "General security audit"
|
||||||
lynis audit system --profile /etc/lynis/ncp.prf --no-colors
|
lynis audit system --profile /etc/lynis/ncp.prf --no-colors
|
||||||
|
|
||||||
@ -74,6 +74,8 @@ configure()
|
|||||||
debsecan
|
debsecan
|
||||||
}
|
}
|
||||||
|
|
||||||
|
install() { :; };
|
||||||
|
|
||||||
# License
|
# License
|
||||||
#
|
#
|
||||||
# This script is free software; you can redistribute it and/or modify it
|
# This script is free software; you can redistribute it and/or modify it
|
||||||
|
|||||||
@ -10,7 +10,7 @@
|
|||||||
# more details at https://ownyourbits.com
|
# more details at https://ownyourbits.com
|
||||||
|
|
||||||
BRANCH=master
|
BRANCH=master
|
||||||
DBG=x
|
#DBG=x
|
||||||
|
|
||||||
set -e$DBG
|
set -e$DBG
|
||||||
|
|
||||||
|
|||||||
@ -221,7 +221,7 @@ EOF
|
|||||||
echo "NextCloudPlus_$( date "+%m-%d-%y" )" > /usr/local/etc/ncp-baseimage
|
echo "NextCloudPlus_$( date "+%m-%d-%y" )" > /usr/local/etc/ncp-baseimage
|
||||||
|
|
||||||
## SSH hardening
|
## 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|^#AllowTcpForwarding .*|AllowTcpForwarding no|' /etc/ssh/sshd_config
|
||||||
sed -i 's|^#ClientAliveCountMax .*|ClientAliveCountMax 2|' /etc/ssh/sshd_config
|
sed -i 's|^#ClientAliveCountMax .*|ClientAliveCountMax 2|' /etc/ssh/sshd_config
|
||||||
sed -i 's|^MaxAuthTries .*|MaxAuthTries 1|' /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|^#Compression .*|Compression no|' /etc/ssh/sshd_config
|
||||||
sed -i 's|^#AllowAgentForwarding .*|AllowAgentForwarding 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
|
sed -i 's|^#PermitRootLogin .*|PermitRootLogin no|' /etc/ssh/sshd_config
|
||||||
}
|
fi
|
||||||
|
|
||||||
## kernel hardening
|
## kernel hardening
|
||||||
cat >> /etc/sysctl.conf <<EOF
|
cat >> /etc/sysctl.conf <<EOF
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user