startPreInstall called installLibrePortalImageWebUI standalone AND then installLibrePortalAppWebUI, whose app-install step 1 builds the same image again — so a fresh install built libreportal-service twice back-to-back (2nd mostly Docker-cache hits, but a redundant copyFolder + "this may take a while" block). The standalone call only matters on a rebuild where the app-install path SKIPS (libreportal already in the DB). Gate it on exactly that: build standalone only when libreportal is already installed. Net: one build in both cases (fresh → via app install; reinstall → standalone). Signed-off-by: librelad <librelad@digitalangels.vip> Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
73 lines
2.0 KiB
Bash
Executable File
73 lines
2.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
startPreInstall()
|
|
{
|
|
# Disable Input
|
|
# stty -echo
|
|
|
|
isHeader "Pre-Installation"
|
|
|
|
#######################################################
|
|
### Install for Operating System ###
|
|
#######################################################
|
|
|
|
installDebianUbuntu;
|
|
installArch;
|
|
|
|
#######################################################
|
|
### Install Docker ###
|
|
#######################################################
|
|
|
|
# Rootless
|
|
installDockerRootlessUser;
|
|
installDockerRootlessStartSetup;
|
|
|
|
# Rooted
|
|
installDockerRooted;
|
|
installDockerRootedCompose;
|
|
installDockerRootedCheck;
|
|
|
|
# Both
|
|
installDockerNetwork;
|
|
|
|
#######################################################
|
|
### Install UFW Firewall ###
|
|
#######################################################
|
|
|
|
installUFW;
|
|
installUFWDocker;
|
|
|
|
#######################################################
|
|
### Install Misc ###
|
|
#######################################################
|
|
|
|
installSQLiteDatabase;
|
|
installCrontab;
|
|
|
|
installSSLCertificate;
|
|
installSwapfile;
|
|
|
|
# installLibrePortalAppWebUI builds the WebUI image as its step 1 on a fresh
|
|
# install (libreportal not yet in the DB). Only build standalone here when
|
|
# that path will be SKIPPED (libreportal already installed — a rebuild), so a
|
|
# fresh install doesn't build the same image twice.
|
|
if [[ "$(dockerCheckAppInstalled libreportal docker)" != "not_installed" ]]; then
|
|
installLibrePortalImageWebUI;
|
|
fi
|
|
installLibrePortalAppWebUI;
|
|
installLibrePortalWebUITaskService;
|
|
|
|
startScan;
|
|
|
|
#######################################################
|
|
### Recommended ###
|
|
#######################################################
|
|
|
|
installRecommendedApps;
|
|
installOptionalMetricsApps;
|
|
|
|
if [[ "$initial_command2" == "terminal" ]]; then
|
|
resetToMenu;
|
|
fi
|
|
}
|