A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys, Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun VPN routing, and a web dashboard to manage it all. Free & open forever to self-host; optional paid hosted services fund it. See PROMISE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
55 lines
1.9 KiB
Bash
Executable File
55 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
sourceInitilize()
|
|
{
|
|
local flag="$1"
|
|
|
|
# We will only show the header for the full app
|
|
if [[ $flag == "run" ]]; then
|
|
isHeader "Loading LibrePortal Startup Files"
|
|
echo -e "${YELLOW}NOTICE:${NC} If you are experiencing loading issues..."
|
|
echo -e "${YELLOW}NOTICE:${NC} Please run the following : 'libreportal reset'"
|
|
fi
|
|
|
|
# Directory containing the files to source recursively
|
|
local file_list_directory="${install_scripts_dir}source/files"
|
|
|
|
# Check if the directory exists
|
|
if [ -d "$file_list_directory" ]; then
|
|
# Use find to get a list of all files (excluding directories) in the directory and its subdirectories
|
|
local file_list=$(find "$file_list_directory" -type f -name "*.sh")
|
|
|
|
# Loop through each file in the file list
|
|
while IFS= read -r file; do
|
|
# Source the file
|
|
source "$file"
|
|
done <<< "$file_list"
|
|
else
|
|
echo "Directory $file_list_directory does not exist. Unable to start!"
|
|
fi
|
|
|
|
# For loading files needed for the full app or CLI
|
|
if [[ $flag == "run" ]]; then
|
|
source "${install_scripts_dir}source/files/app_files.sh"
|
|
files_to_source=("${files_libreportal_app[@]}")
|
|
elif [[ $flag == "cli" ]]; then
|
|
source "${install_scripts_dir}source/files/cli_files.sh"
|
|
files_to_source=("${files_libreportal_cli[@]}")
|
|
fi
|
|
|
|
# Checking for missing files
|
|
for file_to_source in "${files_to_source[@]}"; do
|
|
if [ ! -f "${install_scripts_dir}${file_to_source}" ]; then
|
|
echo "NOTICE: Missing file: ${install_scripts_dir}${file_to_source}"
|
|
else
|
|
source "${install_scripts_dir}${file_to_source}"
|
|
#echo "Sourced file: ${install_scripts_dir}${file_to_source}"
|
|
fi
|
|
done
|
|
|
|
# Loading of all files
|
|
sourceScanFiles "libreportal_configs";
|
|
sourceScanFiles "app_configs";
|
|
sourceScanFiles "containers";
|
|
}
|