refactor(install): order initFolders by root, children grouped under each
Folder creation output interleaved the system/containers/backups roots and their children. Regroup the array so each root is immediately followed by its own children (alphabetical), keeping parents before children since the mkdir has no -p. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
This commit is contained in:
parent
d842ed8447
commit
8c81e8722c
9
init.sh
9
init.sh
@ -995,7 +995,14 @@ initRootHelpers()
|
||||
initFolders()
|
||||
{
|
||||
isHeader "LibrePortal Folder Creation"
|
||||
folders=("$docker_dir" "$containers_dir" "$ssl_dir" "$ssh_dir" "$wireguard_dir" "$logs_dir" "$configs_dir" "$backup_dir" "$backup_install_dir" "$restore_dir" "$migrate_dir" "$script_dir")
|
||||
# Grouped by root, each root immediately followed by its own children
|
||||
# (alphabetical). Order also matters: mkdir below has no -p, so every
|
||||
# parent must be listed before its children.
|
||||
folders=(
|
||||
"$docker_dir" "$configs_dir" "$script_dir" "$logs_dir" "$migrate_dir" "$restore_dir" "$ssh_dir" "$ssl_dir" "$wireguard_dir"
|
||||
"$containers_dir"
|
||||
"$backup_dir" "$backup_install_dir"
|
||||
)
|
||||
for folder in "${folders[@]}"; do
|
||||
if [ ! -d "$folder" ]; then
|
||||
sudo mkdir "$folder"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user