1744 Commits

Author SHA1 Message Date
MickLesk
12d0344e53 fix: handle missing URLs in fetch_and_deploy_gh_release function gracefully 2026-06-02 14:07:22 +02:00
MickLesk
25514eda40 refactor: streamline ClickHouse and OxiCloud installation scripts; update RAM requirements 2026-06-02 11:32:19 +02:00
MickLesk
9a78f9f263 rust_profile 2026-06-02 08:40:59 +02:00
CanbiZ (MickLesk)
4a7c07c8ea Merge pull request #1833 from senk/bugfix/postgresextension
fix(postgresql): quote extension names in CREATE EXTENSION to support hyphens
2026-06-01 08:12:51 +02:00
CanbiZ (MickLesk)
bcd63e5f2e tools.func: Merge from Upstream 2026-05-26 10:59:25 +02:00
MickLesk
6e81aff07e Add support for Proxmox VE 9.2
Update pve_check logic and messages to allow Proxmox VE 9.2 across scripts. Adjusted version bounds (minor <= 2), regex checks (9\.[0-2]), and user-facing error text in misc/core.func, misc/vm-core.func and multiple vm/* scripts (allstarlink, archlinux, cachyos, debian-13, docker-vm-debug, nextcloud, openwrt, opnsense, owncloud, ubuntu2204, ubuntu2404, ubuntu2410, umbrel-os, unifi-os-server). No functional changes beyond expanding supported PVE minor version range and updating messages.
2026-05-21 16:40:30 +02:00
MickLesk
f8ad306b9a fix(mysql): update GPG key from expired 2023 key to 2025 key 2026-05-18 15:15:53 +02:00
MickLesk
5ef713e58c fix(mysql): refactor MySQL setup logic to use new setup_mysql_db function 2026-05-18 14:41:32 +02:00
MickLesk
8d9720a53e fix(mysql): update MySQL installation logic for Debian 13+ to use 8.4 LTS 2026-05-18 14:39:13 +02:00
MickLesk
dd0b3c6538 fix(fleet): downgrade version from 13 to 12 in configuration files and scripts
fix(invidious): correct indentation in version retrieval
fix(fleet-install): switch from MariaDB to MySQL setup and update database creation logic
fix(tools): add MySQL repository handling in helper functions
2026-05-18 14:27:58 +02:00
Robin Naundorf
83ffce2095 fix(postgresql): quote extension names in CREATE EXTENSION to support hyphens
Unquoted extension names like `uuid-ossp` are interpreted as subtraction expressions by the SQL parser, causing exit code 1.
Wrapping the name in double quotes makes it valid for any extension regardless of naming.
2026-05-18 13:15:40 +02:00
tremor021
adfab91fea pin pnpm to v10 2026-05-10 16:42:46 +02:00
MickLesk
4ff70ba166 Stop spinner on cleanup & simplify qm set
Call stop_spinner in cleanup() to ensure any active spinner is stopped on exit. Consolidate duplicated qm set branches in ubuntu2604-vm.sh into a single invocation to reduce code duplication and simplify VM disk/serial configuration. Remove the explicit ide2 cloudinit device and redundant cloud-init status messages; setup_cloud_init() is still invoked when USE_CLOUD_INIT is enabled, keeping cloud-init configuration centralized.
2026-05-07 11:24:02 +02:00
MickLesk
2a8c6b260f Add optional Cloud-Init and q35 support
Introduce optional Cloud-Init integration and better machine type handling for VMs. Changes include: loading cloud-init helpers lazily (load_cloud_init_functions), interactive cloud-init prompt/configuration (vm_prompt_cloud_init) and SSH key handling, a cloud icon for UI, and vm_machine_type_label for readable machine type display. Default machine type switched to q35 and displays the label in prompts and summaries. VM creation logic now conditionally attaches the cloudinit drive (ide2) and runs setup_cloud_init when enabled; otherwise it creates the VM without the cloudinit device. Post-install messaging now either shows cloud-init details or a guidance message about manual guest filesystem expansion. Minor UI/output adjustments and defaults updated accordingly.
2026-05-07 10:16:16 +02:00
MickLesk
27f256a20f Refactor VM script to use shared vm-core helpers
Introduce a shared vm-core loader and refactor the Ubuntu 26.04 VM script to use reusable helper functions. misc/vm-core.func: add COMMUNITY_SCRIPTS_URL default and load_api_functions to dynamically source API helpers, then call load_api_functions from load_functions. vm/ubuntu2604-vm.sh: switch to sourcing the shared vm-core via COMMUNITY_SCRIPTS_URL, replace many inline UI and utility functions with generic vm_* helpers (vm_confirm_new_vm, vm_prompt_*, vm_select_storage, vm_define_disk_references, set_description, etc.), modernize quoting and pushd usage, simplify disk import/resizing logic, and set START_VM default to yes. Also update repository URLs to ProxmoxVED and adjust some behavior (machine type handling, storage/disk references). Overall this centralizes common functionality, reduces duplication, and prepares scripts to use the shared core utilities.
2026-05-07 09:52:57 +02:00
MickLesk
2f5a5771b0 Add interactive VM prompts and error handling
Introduce interactive whiptail-based helpers and robust error handling for VM creation.

- Add error_handler() to report failures (calls post_update_to_api if available), print contextual error info, and call cleanup_vmid.
- Ensure TEMP_DIR is removed in cleanup().
- Replace brittle pve_check with version parsing that supports Proxmox VE 8.0–8.9 and 9.0–9.1 (exits with code 105 on unsupported versions).
- Add ssh_check() to warn users running the script over SSH.
- Add sanitize_vm_hostname() and a suite of vm_* helper functions to prompt and validate interactive settings via whiptail: vm_confirm_new_vm, vm_choose_settings_mode, vm_prompt_vmid, vm_prompt_machine_type, vm_apply_machine_type, vm_prompt_disk_size, vm_prompt_disk_cache, vm_prompt_hostname, vm_prompt_cpu_model, vm_prompt_cpu_cores, vm_prompt_ram, vm_prompt_bridge, vm_prompt_mac, vm_prompt_vlan, vm_prompt_mtu, vm_prompt_start_vm.
- Add storage helpers: vm_select_storage, vm_apply_storage_layout, vm_define_disk_references to detect storage pools, set formats/extensions and prepare disk refs.
- Use APP/NSAPP for description title by introducing local description_title in set_description().

These changes centralize validation and interactive flow, improve UX, and harden error reporting and cleanup.
2026-05-07 09:45:45 +02:00
CanbiZ (MickLesk)
c632b4eeaa fix release parsing 2026-04-30 13:57:35 +02:00
CanbiZ (MickLesk)
f490247be0 Add GitLab checker; gate storyteller update
Introduce GitLab release helpers and use them to conditionally update Storyteller.

- misc/tools.func: add get_latest_gitlab_release and check_for_gl_release functions (GitLab API calls, token support, pinning, error handling, requires jq).
- ct/storyteller.sh: wrap update sequence with check_for_gl_release so rebuild/deploy only runs when a new GitLab release is detected; update author metadata.
- install/storyteller-install.sh: remove python3 from apt dependencies and drop NODE_OPTIONS export; minor whitespace cleanup.

These changes prevent unnecessary rebuilds by detecting upstream GitLab releases and improve robustness of release detection and error reporting.
2026-04-30 13:41:10 +02:00
tremor021
390061cf50 tools.func: handle minor versions for 8.x 2026-04-30 12:17:36 +02:00
CanbiZ (MickLesk)
e531e0372c Update tools.func 2026-04-30 09:37:35 +02:00
CanbiZ (MickLesk)
33cf0fe2ae Update tools.func 2026-04-30 09:28:12 +02:00
CanbiZ (MickLesk)
db39c543a3 Update tools.func 2026-04-30 08:58:53 +02:00
CanbiZ (MickLesk)
8520c25ca4 Lock TERM to linux for LXC noVNC console
Append a guarded snippet to /root/.bash_profile that forces TERM=linux on physical LXC consoles (e.g. noVNC) for login shells. This prevents readline (8.2+) from querying CPR (ESC[6n) which can produce stray R;80R garbage; the change runs only for non-SSH sessions and detects /dev/console or /dev/ttyN. The block is only added if a __cs_console_term marker is not already present.
2026-04-28 15:47:30 +02:00
CanbiZ (MickLesk)
669d0d847f fix motd 2026-04-28 14:58:57 +02:00
CanbiZ (MickLesk)
9e30f95776 Update build.func 2026-04-28 13:49:44 +02:00
CanbiZ (MickLesk)
40f383df63 Update build.func 2026-04-28 13:45:34 +02:00
CanbiZ (MickLesk)
d9f8fee4e5 Set TERM=linux for console-getty.service
Create a systemd override for console-getty.service inside LXC containers to set Environment=TERM=linux (written to /etc/systemd/system/console-getty.service.d/pve-console-term.conf) instead of touching getty@tty1/serial-getty unit dirs. This targets the noVNC/LXC console behavior where console-getty.service, not getty@tty1, is used and prevents agetty cursor-position queries from corrupting the noVNC login prompt. Also remove the older workaround in create_lxc_container that forced 'cmode: console' in the LXC config, since the new override addresses the issue.
2026-04-28 11:35:45 +02:00
CanbiZ (MickLesk)
77a91b7f6e test motd
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 11:19:24 +02:00
CanbiZ (MickLesk)
7b520d8be3 mirrors for dnf systems
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 11:04:57 +02:00
CanbiZ (MickLesk)
0984b7ecee lowercase os
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 10:43:20 +02:00
CanbiZ (MickLesk)
497f09934f add injected code for openeuler
Co-authored-by: Copilot <copilot@github.com>
2026-04-28 10:37:09 +02:00
CanbiZ (MickLesk)
01ea69616b Update install.func 2026-04-27 16:40:19 +02:00
CanbiZ (MickLesk)
268eb07bb3 Make spinner robust and improve Gentoo bootstrap
Reset shell command hash in spinner and make sleep resilient to shells without redirected sleep, preventing stale PATH lookups and failures in background subshells. Improve Gentoo bootstrap by syncing portage (emerge-webrsync or emerge --sync), preferring binary packages (--getbinpkg --usepkg) before falling back to source emerge, and add a fallback fetcher: prefer curl but use wget if curl is unavailable; fail with a clear error if neither is present. Replace direct curl sourcing with a configurable _fetch command to support the wget fallback.
2026-04-27 16:17:08 +02:00
CanbiZ (MickLesk)
52765ca1e3 Update build.func 2026-04-27 15:44:55 +02:00
CanbiZ (MickLesk)
ee403a74d3 Update install.func 2026-04-27 15:31:14 +02:00
CanbiZ (MickLesk)
ca74918a3e Update install.func 2026-04-27 15:19:03 +02:00
CanbiZ (MickLesk)
2708b36416 Fix container locale, TERM and tty sizing
Add a forced container env (_ct_env) exporting LC_ALL/LANG=C.UTF-8 and DEBIAN_FRONTEND to ensure commands (apt, sed, locale-gen, getent, tz setup) run reliably in fresh templates that lack generated locales. Use the env when running pct exec for locale setup, timezone symlink, DNS checks, and apt installs.

Improve terminal handling: set TERM=xterm-256color only for SSH sessions by appending a guarded block to /root/.bashrc, disable /etc/profile.d/vte.{sh,csh} by renaming them to avoid CSI 6n prompt garbage on LXC/noVNC consoles, and add /etc/profile.d/00-lxc-term-size.sh to force a sane stty rows/cols when the pseudo-tty reports 0x0. These changes prevent locale-related errors and stray CSI responses in LXC containers.
2026-04-27 14:24:28 +02:00
CanbiZ (MickLesk)
7a8b8e56ca Update install.func 2026-04-27 14:18:07 +02:00
CanbiZ (MickLesk)
b994f6a2c0 Improve LXC getty autologin handling
Configure both container-getty@1 and console-getty to auto-login root with unified agetty options, ensuring either Proxmox noVNC (/dev/tty1) or pct/serial (/dev/console) works. Add stable _agetty_opts, write per-service override files, enable console-getty on distros that need it, and reload systemd. Disable vte profile scripts to avoid cursor-query noise on first prompt, restart only active getty services to avoid duplicates, and create /root/.hushlogin to suppress login messages.
2026-04-27 14:13:41 +02:00
CanbiZ (MickLesk)
5334accd1c Support non-apt OS, fix sysvinit autologin
Refine LXC container bootstrap and sysvinit autologin handling.

- Fix case branch formatting and change Debian-family check to an elif to avoid logic fall-through.
- Add a non-apt branch for Fedora/Rocky/Alma/CentOS/openEuler/openSUSE/Arch/Gentoo that sets the container timezone from the host and ensures curl is installed via the appropriate package manager.
- Improve sysvinit (/etc/inittab) auto-login changes: use more robust sed patterns, append a console autologin entry via heredoc, signal init to reload inittab before killing getty processes, and target getty processes more precisely to ensure proper respawn with new settings.
2026-04-27 14:04:39 +02:00
CanbiZ (MickLesk)
582eb5c718 add compare 2026-04-27 13:57:46 +02:00
CanbiZ (MickLesk)
c0af703716 Set C.UTF-8 locale for apt-based containers
Suppress perl/apt locale warnings by configuring C.UTF-8 for apt-based systems. The script now exports DEBIAN_FRONTEND=noninteractive and LC_ALL/LANG/LANGUAGE=C.UTF-8 when PKG_MANAGER==apt, and appends LC_ALL and LANG to /etc/environment if not present. This addresses cases where a container inherits an ungenerated host locale (e.g. Devuan) and ensures C.UTF-8, which is always available, is used.
2026-04-27 13:56:46 +02:00
CanbiZ (MickLesk)
ac042d1388 fix preflight 2026-04-27 13:55:26 +02:00
CanbiZ (MickLesk)
796b79241c Add Arch Linux CT support and pacman integration
Add Arch Linux container support and integrate pacman into install utilities. New files: ct/archlinux.sh (container build/update script), install/archlinux-install.sh (install entrypoint), and json/archlinux.json (metadata). misc/install.func: detect_arch in detect_os, add pacman bootstrap, and implement pacman handlers for pkg_upgrade, pkg_install, pkg_remove, pkg_clean and package refresh; include openssh install path for pacman and provide a cleanup_lxc override to run pkg_clean. Enables creating/updating Arch Linux LXC containers and proper package manager handling.
2026-04-27 13:46:18 +02:00
CanbiZ (MickLesk)
bbd890bc3f Add telemetry pings & improve container install funcs
Bump Fedora template to 43 and enhance container installation tooling. Persist DIAGNOSTICS setting and introduce post_progress_to_api() to send lightweight telemetry pings from inside containers (fire-and-forget, enabled when DIAGNOSTICS=yes and RANDOM_UUID set). Harden package management flows: re-detect PKG_MANAGER when commands are missing, add apt mirror fallback logic (apt_update_safe) and more robust apt-cacher proxy parsing. Fix Debian 13 LXC root ownership bug (chown /) and add additional DNS/Git host checks (including api.github.com). Improve downloading and validation of tools.func, add multiple post_progress_to_api hooks to signal progress, and add two new install entrypoints (misc/main/install.func and misc/main/alpine-install.func) that consolidate network checks, OS updates, MOTD/SSH setup and container customization.
2026-04-27 13:40:30 +02:00
CanbiZ (MickLesk)
89095f3d5d trek: seed default admin, fix install and hooks
Seed a default admin account and harden the installer; update symlink behavior and LXC hook argument handling.

- Install: downgrade Node setup to 22, write ADMIN_EMAIL/ADMIN_PASSWORD into /opt/trek/server/.env for initial boot, chmod the file, wait for app health, then remove plaintext creds from the env and print the default admin credentials. Remove previous DB patching script and credentials file generation. Add health-check failure handling.
- ct/trek.sh: check for /opt/trek instead of ~/.trek, run npm ci without --production, and recreate server data/uploads by removing any existing dirs and creating explicit symlinks.
- Installer: mirror symlink strategy used in the container (rm then ln -s) and ensure generated ENCRYPTION_KEY note; add ADMIN_EMAIL default.
- json: set default username to admin@trek.local, update notes about seeded admin, ENCRYPTION_KEY storage, and APP_URL recommendation.
- tools/pve/lxc-prehook.sh: fix append_unique_line_in_ct to pass positional arguments into the bash -c snippet safely (avoid parent-shell expansion).

These changes ensure a reproducible default admin creation flow without leaving plaintext credentials, improve symlink handling, and fix a bug in the LXC prehook.
2026-04-24 09:52:03 +02:00
Michel Roegl-Brunner
587f9f9b0e Add generated mode 2026-04-07 16:09:52 +02:00
MickLesk
f7258d5268 fix(fleet,mysql): switch Fleet to MariaDB, add mysql case to manage_tool_repository
- fleet: use setup_mariadb instead of setup_mysql (MariaDB works fine for
  Fleet and avoids MySQL repo complexity on trixie)
- tools.func: add missing mysql) case block to manage_tool_repository
  (was causing 'Unknown tool repository: mysql' error)
2026-04-05 18:35:51 +02:00
MickLesk
363df9ddac fix(otbr,kan,mysql): OTBR vendor/model/socat/web binding, Kan build env vars, MySQL trixie support
- openthread-br: add socat dep for TCP adapters, add --vendor-name/--model-name
  (mandatory), bind REST API to 0.0.0.0:8081, configure otbr-web to listen on
  all interfaces, update TCP example with socat forkpty pattern
- kan: export BETTER_AUTH_SECRET and POSTGRES_URL before build (required by
  @t3-oss/env-nextjs zod validation at build time)
- mysql: remove MariaDB-on-trixie workaround (MySQL repo now has trixie packages),
  update GPG key from RPM-GPG-KEY-mysql-2023 to RPM-GPG-KEY-mysql-2025
2026-04-05 18:26:11 +02:00
MickLesk
63ae2eb8d4 fix(tools): use MariaDB on Debian trixie instead of MySQL repo
MySQL APT repo GPG key (RPM-GPG-KEY-mysql-2023) expired 2025-10-22
and no trixie packages exist. Use distro MariaDB which is a drop-in
replacement and natively available.
2026-04-04 23:33:17 +02:00