LibrePortal/scripts/source/load_sources.sh
librelad 875a60f90f LibrePortal v0.1.0 — initial release
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>
2026-05-21 20:37:54 +01:00

49 lines
2.4 KiB
Bash
Executable File

#!/bin/bash
# This is used for initial loading
# The starting point and is the only code that doesnt contain logic requirements
# Source "init.sh" and "variables.sh" if they exist, otherwise return an error
if [ -f "init.sh" ] && [ -f "variables.sh" ]; then
source "init.sh"
source "variables.sh"
else
# Print an error message for any missing files
[ ! -f "init.sh" ] && isError " File 'init.sh' does not exist. Unable to source."
[ ! -f "variables.sh" ] && isError " File 'variables.sh' does not exist. Unable to source."
echo "Files are missing, please run 'libreportal reset'"
fi
# Source config check
if [ -f "${install_scripts_dir}config/core/config_check_missing.sh" ]; then
source "${install_scripts_dir}config/core/config_check_missing.sh"
checkConfigFilesMissingFiles;
else
# Print an error message for any missing files
[ ! -f "${install_scripts_dir}config/core/config_check_missing.sh" ] && isError " File '${install_scripts_dir}config/core/config_check_missing.sh' does not exist. Unable to source."
echo "Files are missing, please run 'libreportal reset'"
fi
# Source the remaining files if they all exist
if [ -f "${install_scripts_dir}source/loading/check_files.sh" ] && \
[ -f "${install_scripts_dir}source/loading/initilize_files.sh" ] && \
[ -f "${install_scripts_dir}source/loading/scan_files.sh" ]; then
source "${install_scripts_dir}source/loading/check_files.sh"
source "${install_scripts_dir}source/loading/initilize_files.sh"
source "${install_scripts_dir}source/loading/scan_files.sh"
else
# Print an error message for any missing files
[ ! -f "${install_scripts_dir}source/loading/check_files.sh" ] && isError " File '${install_scripts_dir}source/loading/check_files.sh' does not exist. Unable to source."
[ ! -f "${install_scripts_dir}source/loading/initilize_files.sh" ] && isError " File '${install_scripts_dir}source/loading/initilize_files.sh' does not exist. Unable to source."
[ ! -f "${install_scripts_dir}source/loading/scan_files.sh" ] && isError " File '${install_scripts_dir}source/loading/scan_files.sh' does not exist. Unable to source."
echo "Files are missing, please run 'libreportal reset'"
fi
# For starting the script
if [[ $init_run_flag == "true" ]]; then
# For loading LibrePortal
sourceCheckFiles "run";
elif [[ $init_run_flag == "false" ]]; then
# For using the CLI
sourceCheckFiles "cli";
fi