.
This commit is contained in:
@@ -4,9 +4,6 @@
|
|||||||
# Implements 2FA for SSH, Cockpit, and Webmin services
|
# Implements 2FA for SSH, Cockpit, and Webmin services
|
||||||
# Uses Google Authenticator (TOTP) for time-based tokens
|
# Uses Google Authenticator (TOTP) for time-based tokens
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
# Source framework functions
|
|
||||||
# Script can be called from different contexts, so use absolute path resolution
|
# Script can be called from different contexts, so use absolute path resolution
|
||||||
SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
SCRIPT_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
|
||||||
PROJECT_ROOT="$(dirname "$(dirname "$(dirname "$SCRIPT_DIR")")")"
|
PROJECT_ROOT="$(dirname "$(dirname "$(dirname "$SCRIPT_DIR")")")"
|
||||||
@@ -14,9 +11,27 @@ PROJECT_ROOT="$(dirname "$(dirname "$(dirname "$SCRIPT_DIR")")")"
|
|||||||
# Set up framework variables expected by includes
|
# Set up framework variables expected by includes
|
||||||
export PROJECT_ROOT_PATH="$PROJECT_ROOT"
|
export PROJECT_ROOT_PATH="$PROJECT_ROOT"
|
||||||
|
|
||||||
source "$PROJECT_ROOT/Framework-Includes/PrettyPrint.sh"
|
export PROJECT_ROOT_PATH
|
||||||
source "$PROJECT_ROOT/Framework-Includes/Logging.sh"
|
PROJECT_ROOT_PATH="$(realpath ../../../)"
|
||||||
source "$PROJECT_ROOT/Framework-Includes/ErrorHandling.sh"
|
|
||||||
|
export GIT_VENDOR_PATH_ROOT
|
||||||
|
GIT_VENDOR_PATH_ROOT="$PROJECT_ROOT_PATH/vendor/git@git.knownelement.com/29418/"
|
||||||
|
|
||||||
|
export KNELShellFrameworkRoot
|
||||||
|
KNELShellFrameworkRoot="$GIT_VENDOR_PATH_ROOT/KNEL/KNELShellFramework"
|
||||||
|
|
||||||
|
#Framework variables are read from hee
|
||||||
|
source $KNELShellFrameworkRoot/Framework-ConfigFiles/FrameworkVars
|
||||||
|
|
||||||
|
# Source framework functions
|
||||||
|
for framework_include_file in $KNELShellFrameworkRoot/Framework-Includes/*; do
|
||||||
|
source "$framework_include_file"
|
||||||
|
done
|
||||||
|
|
||||||
|
for project_include_file in ../Project-Includes/*; do
|
||||||
|
source "$project_include_file"
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
# 2FA Configuration
|
# 2FA Configuration
|
||||||
BACKUP_DIR="/root/backup/2fa"
|
BACKUP_DIR="/root/backup/2fa"
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#####
|
#####
|
||||||
|
|
||||||
export PROJECT_ROOT_PATH
|
export PROJECT_ROOT_PATH
|
||||||
PROJECT_ROOT_PATH="$(realpath ../../)"
|
PROJECT_ROOT_PATH="$(realpath ../../../)"
|
||||||
|
|
||||||
#Framework variables are read from hee
|
#Framework variables are read from hee
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#####
|
#####
|
||||||
|
|
||||||
export PROJECT_ROOT_PATH
|
export PROJECT_ROOT_PATH
|
||||||
PROJECT_ROOT_PATH="$(realpath ../)"
|
PROJECT_ROOT_PATH="$(realpath ../../../)"
|
||||||
|
|
||||||
#Framework variables are read from hee
|
#Framework variables are read from hee
|
||||||
|
|
||||||
|
@@ -5,7 +5,7 @@
|
|||||||
#####
|
#####
|
||||||
|
|
||||||
export PROJECT_ROOT_PATH
|
export PROJECT_ROOT_PATH
|
||||||
PROJECT_ROOT_PATH="$(realpath ../../)"
|
PROJECT_ROOT_PATH="$(realpath ../../../)"
|
||||||
|
|
||||||
#Framework variables are read from hee
|
#Framework variables are read from hee
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user