#!/bin/bash # Category : Features # Description : getlibreportal - Website + signed-release host (c/u/s/r/i): installGetlibreportal() { local config_variables="$1" if [[ "$getlibreportal" == *[cCtTuUsSrRiI]* ]]; then dockerConfigSetupToContainer silent getlibreportal; local app_name=$CFG_GETLIBREPORTAL_APP_NAME initializeAppVariables $app_name; fi if [[ "$getlibreportal" == *[cC]* ]]; then editAppConfig $app_name; fi if [[ "$getlibreportal" == *[uU]* ]]; then dockerUninstallApp $app_name; fi if [[ "$getlibreportal" == *[sS]* ]]; then dockerComposeDown $app_name; fi if [[ "$getlibreportal" == *[rR]* ]]; then dockerComposeRestart $app_name; fi if [[ "$getlibreportal" == *[iI]* ]]; then isHeader "Install $app_name" ((menu_number++)) echo "" echo "---- $menu_number. Setting up install folder and config file for $app_name." echo "" dockerConfigSetupToContainer "loud" "$app_name" "install" "$config_variables"; isSuccessful "Install folders and Config files have been setup for $app_name." ((menu_number++)) echo "" echo "---- $menu_number. Setting up the $app_name docker-compose.yml file." echo "" dockerComposeSetupFile $app_name; ((menu_number++)) echo "" echo "---- $menu_number. Updating file permissions before starting." echo "" fixPermissionsBeforeStart $app_name; ((menu_number++)) echo "" echo "---- $menu_number. Running the docker-compose.yml to install and start $app_name" echo "" dockerComposeUpdateAndStartApp $app_name install; ((menu_number++)) echo "" echo "---- $menu_number. Running Application specific updates (if required)" echo "" appUpdateSpecifics $app_name; ((menu_number++)) echo "" echo "---- $menu_number. Running Headscale setup (if required)" echo "" setupHeadscale $app_name; ((menu_number++)) echo "" echo "---- $menu_number. Adding $app_name to the Apps Database table." echo "" databaseInstallApp $app_name; ((menu_number++)) echo "" echo "---- $menu_number. Updating WebUI config file." echo "" webuiContainerSetup $app_name install; ((menu_number++)) echo "" echo "---- $menu_number. Populate the docroot, then browse $app_name." echo "" echo " The container serves an EMPTY docroot until you publish content." echo " From a full repo checkout (build/release machine) run:" echo " containers/getlibreportal/publish.sh $containers_dir$app_name/data" echo " (copies install.sh + the dist/ releases; the website is" echo " a separate app, weblibreportal)." echo "" menuShowFinalMessages $app_name; menu_number=0 cd fi getlibreportal=n }