3 Commits

Author SHA1 Message Date
librelad
3d09105ed5 fix(update): define backup_install_dir + correct gitCleanInstallBackups find
Three small bugs in the legacy git-update flow that all hung off the
same never-set variable:

1. backup_install_dir was referenced in 4 files (reset_git_backup,
   install_git_backup, use_git_backup, config_git_check) but DEFINED
   nowhere — never has been, in any branch or tag. Resolved to "", so
   "$backup_install_dir/$backupFolder" became "/backup_<ts>" (filesystem
   root, perm denied). Add it to libreportalDerivePaths beside the other
   roots, point it at $backup_dir/install (a sibling of restic's per-
   location subdirs at $backup_dir/<idx>), and add it to initFolders so
   it exists on first install.

2. gitCleanInstallBackups' find expression was
       find ... -mindepth 1 -type f ! -name '*.zip' -o -type d ! -name '*.zip' -exec rm -rf {} +
   `-o` binds looser than the implicit -a, so the -exec only applied to
   the second clause. That meant: every non-.zip DIR anywhere under the
   tree got deleted; every non-.zip FILE got matched and ignored. Even
   once $backup_install_dir resolved correctly the cleanup would've
   wrecked unrelated dirs.
   Collapsed to `-mindepth 1 -maxdepth 1 ! -name '*.zip' -exec rm -rf {} +`
   — direct children of $backup_install_dir, kill everything that isn't
   a zip, let -rf take care of the dirs. Synthetic-tree smoke test
   confirms only the .zip files survive.

3. use_git_backup.sh had a typo'd doubled var:
       copyFolders "$backup_install_dir$backup_install_dir/$backup_file_without_zip/" ...
   Reduced to the single $backup_install_dir/$backup_file_without_zip/.

All three only fire in the manual-update path (libreportal update apply
under git/local install mode); the install-blocking path is unaffected.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-26 21:47:12 +01:00
librelad
92c731952b refactor(de-sudo): update/git backup helpers off raw sudo
The git-update backup helpers operate on the manager-owned $backup_install_dir:
use_git_backup unzip + config_git_check find -> runInstallOp; install_git_backup
standalone find -> runInstallOp (drop the nested -exec sudo rm), and its
cd && find | xargs rm pipeline drops its sudos (manager owns the dir). The
many 'sudo -u $sudo_user_name git/rm/zip' calls stay (already least-privilege).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Signed-off-by: librelad <librelad@digitalangels.vip>
2026-05-24 17:05:37 +01:00
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