ok. i think this is the last of the regressions.

This commit is contained in:
2025-07-02 18:06:26 -05:00
parent d76613c0dc
commit f06d8b1fe5
2 changed files with 219 additions and 250 deletions

View File

@ -1,24 +1,14 @@
#!/bin/bash
#Framework variables are read from hee
source "$FRAMEWORK_CONFIGS_FULL_PATH"/FrameworkVars
#Boilerplate and support functions
FrameworkIncludeFiles="$(ls -1 --color=none "$FRAMEWORK_INCLUDES_FULL_PATH"/*)"
IFS=$'\n\t'
for file in "${FrameworkIncludeFiles[@]}"; do
. "$file"
for framework_include_file in ../../../Framework-Includes/*; do
source "$framework_include_file"
done
unset IFS
ProjectIncludeFiles="$(ls -1 --color=none "$PROJECT_INCLUDES_FULL_PATH"/*)"
IFS=$'\n\t'
for file in "${ProjectIncludeFiles[@]}"; do
. "$file"
for project_include_file in ../../../Project-Includes/*; do
source "$project_include_file"
done
unset IFS
export SUBODEV_CHECK
SUBODEV_CHECK="$(getent passwd|grep -c subodev || true)"

View File

@ -10,7 +10,6 @@ PROJECT_ROOT_PATH="$(realpath ../)"
#Framework variables are read from hee
source $PROJECT_ROOT_PATH/Framework-ConfigFiles/FrameworkVars
for framework_include_file in ../Framework-Includes/*; do
source "$framework_include_file"
done
@ -39,13 +38,11 @@ LOCALUSER_CHECK="$(getent passwd|grep -c localuser || true)"
export DL_ROOT
DL_ROOT="https://dl.knownelement.com/KNEL/FetchApply/"
#######################
# Support functions
#######################
function global-oam()
{
function global-oam() {
print_info "Now running "$FUNCNAME"...."
cat ./scripts/up2date.sh >/usr/local/bin/up2date.sh && chmod +x /usr/local/bin/up2date.sh
@ -58,26 +55,21 @@ print_info "Completed running "$FUNCNAME""
}
function global-systemServiceConfigurationFiles()
{
function global-systemServiceConfigurationFiles() {
print_info "Now running "$FUNCNAME"...."
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/ZSH/tsys-zshrc >/etc/zshrc
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/SMTP/aliases >/etc/aliases
curl --silent ${DL_ROOT}/ProjectCode/ConfigFiles/Syslog/rsyslog.conf >/etc/rsyslog.conf
newaliases
print_info "Completed running "$FUNCNAME""
}
function global-installPackages()
{
function global-installPackages() {
print_info "Now running "$FUNCNAME"...."
# Setup webmin repo, used for RBAC/2fa PAM
curl https://raw.githubusercontent.com/webmin/webmin/master/webmin-setup-repo.sh >/tmp/webmin-setup.sh
@ -198,8 +190,7 @@ fi
print_info "Completed running "$FUNCNAME""
}
function global-postPackageConfiguration()
{
function global-postPackageConfiguration() {
print_info "Now running "$FUNCNAME""
@ -275,7 +266,6 @@ systemctl start postfix
/usr/sbin/accton on
if [ "$IS_PHYSICAL_HOST" -gt 0 ]; then
cpufreq-set -r -g performance
cpupower frequency-set --governor performance
@ -295,7 +285,6 @@ fi
print_info "Completed running "$FUNCNAME""
}
####################################################################################################
# Run various modules
####################################################################################################
@ -306,8 +295,7 @@ print_info "Completed running "$FUNCNAME""
# SSH
function secharden-ssh()
{
function secharden-ssh() {
print_info "Now running "$FUNCNAME""
cd ./Modules/Security
@ -317,55 +305,46 @@ cd -
print_info "Completed running "$FUNCNAME""
}
function secharden-wazuh()
{
function secharden-wazuh() {
print_info "Now running "$FUNCNAME""
bash ./Modules/Security/secharden-wazuh.sh
print_info "Completed running "$FUNCNAME""
}
function secharden-auto-upgrades()
{
function secharden-auto-upgrades() {
print_info "Now running "$FUNCNAME""
#curl --silent ${DL_ROOT}/Modules/Security/secharden-ssh.sh|$(which bash)
print_info "Completed running "$FUNCNAME""
}
function secharden-2fa()
{
function secharden-2fa() {
print_info "Now running "$FUNCNAME""
#curl --silent ${DL_ROOT}/Modules/Security/secharden-2fa.sh|$(which bash)
print_info "Completed running "$FUNCNAME""
}
function secharden-agents()
{
function secharden-agents() {
print_info "Now running "$FUNCNAME""
#curl --silent ${DL_ROOT}/Modules/Security/secharden-audit-agents.sh|$(which bash)
print_info "Completed running "$FUNCNAME""
}
function secharden-scap-stig()
{
function secharden-scap-stig() {
print_info "Now running "$FUNCNAME""
bash ./Modules/Security/secharden-scap-stig.sh
print_info "Completed running "$FUNCNAME""
}
####################################################################################################
# Authentication
####################################################################################################
function auth-cloudron-ldap()
{
function auth-cloudron-ldap() {
print_info "Now running "$FUNCNAME""
#curl --silent ${DL_ROOT}/Modules/Auth/auth-cloudron-ldap.sh|$(which bash)
print_info "Completed running "$FUNCNAME""
}
####################################################################################################
# RUn the various functions in the correct order
####################################################################################################