Commit Graph

233 Commits

Author SHA1 Message Date
CanbiZ (MickLesk) d77c65093b Say why an update-apps backup or restore failed (#18405)
vzdump and pct restore ran with their output thrown away, so a failed
backup only said "Backup failed for container N" (exit 235). That is the
second most common update-apps failure and none of them can be told
apart. Keep the output in the run log and put its error line in the
message, e.g. "CT is locked (backup)".

var_backup_storage was matched with grep -w, so "truenas" passed when
only "truenas-backup" exists and vzdump then failed on a storage that
does not exist. Match the whole name, and list the valid ones in the
error instead of a spinner line after it.

Name the app in "Update failed for container N", so a failed update
says which app's update failed. Declining the start dialog now exits 0
like the other tools instead of failing with whiptail's 1.
2026-11-03 14:58:35 +01:00
CanbiZ (MickLesk) 11acd8db75 Keep host tools running when clear does not know the terminal (#18412)
clear exits 1 for a TERM the host has no terminfo entry for, such as
xterm-ghostty or xterm-kitty over SSH, and when TERM is unset under cron.
The tools that run under errexit died on it in header_info within a
second, before showing anything, which telemetry counts as
"exit_code=1 | General error" with no step for update-lxcs, update-repo,
fstrim, clean-lxcs, execute and storage-share-helper.

Fall back to the escape sequence the engine's _cs_clear uses.
2026-11-03 14:30:57 +01:00
CanbiZ (MickLesk) 2c4fbc01eb all-templates: answering No or Cancel is not a failure (#18423)
Both whiptail prompts ran bare under errexit, so No on the first question
or Cancel in the template list ended in the error handler and was reported
as a failed run (3 of 5 failures in three days).

Monitor-All is now stopped right before the download instead of at the
start, so leaving at a prompt no longer leaves it stopped.
2026-11-03 14:26:31 +01:00
CanbiZ (MickLesk) dd7a659f22 homebrew: skip service accounts when picking the user, survive a failed apt update (#18424)
The user was the first passwd entry with a UID from 1000 up. On a Proxmox
host with Ceph that is ceph (UID 64045, shell nologin), and su - ceph fails
with "This account is currently not available". Accounts without a login
shell are skipped now.

apt update on a host with the enterprise repository and no subscription exits
100 on the 401. apt_update_safe retries, says why and carries on, as the other
scripts already do since #17462.
2026-11-03 14:26:23 +01:00
CanbiZ (MickLesk) 2fbb6e261c add-tailscale-lxc: start a stopped container and check its OS first (#18421)
The container menu lists stopped containers too, and pct exec on one exits
255: 12 of 41 failures in three days. Start it the way add-netbird-lxc does
and wait for its default route.

The install runs under bash, which an Alpine container from the template does
not have; lxc-attach then exits 127 before the Alpine branch is reached.
Install bash there first, and stop with a clear message on any OS other than
Debian, Ubuntu or Alpine instead of failing on apt-get.
2026-11-03 14:22:52 +01:00
CanbiZ (MickLesk) 770d89bb90 Refuse to run the PBS 4 upgrade on a Proxmox VE host (#18416)
Nothing checked that the host is a Backup Server. On a PVE host the
first step stopped only because tar found no /etc/proxmox-backup (exit
2); answering "no" to that backup would have gone on to delete
/etc/apt/sources.list.d/*.list, add the PBS repositories and
dist-upgrade. Stop with the same message post-pbs-install uses.
2026-11-03 14:14:11 +01:00
CanbiZ (MickLesk) 96710d22f2 netdata: survive a failed apt update, leave quietly on Cancel (#18427)
The add-on runs on the Proxmox host, where the enterprise repository without a
subscription answers 401 and apt update exits 100 (2 of 3 failures in three
days). apt_update_safe retries, points at the enterprise repository and
carries on; the netdata repository was fetched fine.

Cancel in the first menu was reported as a failed run.
2026-11-03 14:12:57 +01:00
CanbiZ (MickLesk) 61dcda815a Keep trimming when pct fstrim fails on one container (#18413)
pct fstrim exits 255 when the container is locked, for example while a
backup runs ("CT is locked (backup)"). Under errexit the command
substitution ended the whole run there, before the output check below it
and before the remaining containers, and telemetry filed it as
"DPKG: Fatal internal error". Print the result and go on instead.
2026-11-03 14:00:54 +01:00
CanbiZ (MickLesk) 2340816c4e Do not abort execute-lxcs on a container that is not Debian or Ubuntu (#18414)
The skip message printed $name, which is only set once a container has
run the command. When a non-Debian container (Alpine, for example) came
before any Debian one, set -u ended the run there with "name: unbound
variable" and exit 1; later it printed the previous container's name.
2026-11-03 13:59:54 +01:00
CanbiZ (MickLesk) 7700d7ce36 Offer only container-capable storages as the converter's restore target (#18415)
The target list came from storages with "images" content, but pct
restore puts the container's rootfs there and refuses a storage without
"rootdir" ("storage 'X' does not support container directories"). A
storage that holds VM disks only was offered, and picking it ended the
run after the backup with "Conversion failed" (exit 235).
2026-11-03 13:59:51 +01:00
CanbiZ (MickLesk) 8dc0d17740 Let post-pve-install go on when legacy sources are kept (#18403)
On a PVE 9 host without deb822 .sources files the script asks whether to
disable the legacy .list sources, then read the answer from $? on the
next line. Under set -e a "No" ended the whole run with exit 1 right
there, so the "Kept legacy sources as-is" branch never ran and nothing
after it was offered. Test whiptail in the if instead.
2026-11-03 13:54:14 +01:00
CanbiZ (MickLesk) c566b53552 Drop the legacy engine copies from misc/ (#18294)
* Drop the legacy engine copies from misc/

Nothing has loaded misc/*.func since ct/, install/, vm/ and tools/ moved to
community-scripts/core. misc/api.func stays until vm/owncloud-vm.sh gets its
DevScripts rewrite.

misc/images/ moves to .github/assets/. The tombstone stub for removed scripts
sourced misc/build.func and called variables(), which core's PVE engine does
not define; it now sources core.func.

* Drop misc/api.func

vm/owncloud-vm.sh was its last caller; DevScripts holds that script's rewrite
onto core/pve/vm-core.func. Merge this after the promotion.
2026-11-01 01:13:41 +10:00
CanbiZ (MickLesk) 359fd5d01a post-pmg-install: hide the subscription nag in the PMG 9 mobile quarantine (#18140)
* post-pmg-install: hide the subscription nag in the PMG 9 mobile quarantine

PMG 9 replaced pmgmanagerlib-mobile.js with the Yew/WASM app in
pmg-mobile-quarantine-ui, so the mobile hook no longer found its file.
The status check is compiled into the WASM, so the helper now injects a
fetch wrapper into the mobile index template that reports the
subscription as active to the app. The API response itself is unchanged.

All patches move into /usr/local/bin/pmg-remove-nag.sh behind a single
apt hook. "no" now also removes the mobile hook and the helper, and the
reinstall covers pmg-mobile-quarantine-ui so its template is restored.

Fixes #16217

* post-pmg-install: reinstall the mobile quarantine UI only where it exists

pmg-mobile-quarantine-ui is not in the PMG 8 (bookworm) repository, so
naming it in the reinstall made apt abort there and skip the widget
toolkit reinstall as well.
2026-10-25 15:07:47 +01:00
CanbiZ (MickLesk) b656e99820 post-pve-install: hide the mobile subscription nag in every UI language (#18143)
The mobile UI patch removed the dialog and card only when their text
contained "subscription", so translated UIs (de: "Subskription", fr:
"Abonnement", ...) kept the nag. It also deleted DOM nodes Yew still
owns and polled every 300 ms for good.

The helper now injects a fetch wrapper into the mobile index template
that fills the empty subscription level of each node in the /nodes
response, so the app never shows the alert or card. The API response
itself is unchanged; the node list shows "-" instead of "No
subscription". The mobile UI package is reinstalled alongside the widget
toolkit so old blocks are dropped, and "no" also removes the helper.
2026-10-25 12:17:28 +01:00
mazelado e63332742a fix(addons): use catch_errors so the update marker is cleared (#18128)
Addons only trapped ERR, so on_exit never ran and ~/.<app>.pending from
fetch_and_deploy_release survived every successful update: each later run
reported 'the last run did not finish' and redeployed. Use catch_errors,
as ct scripts and dockhand.sh already do.


Claude-Session: https://claude.ai/code/session_01BNGzU5KdgKFAGcqJECnnav

Co-authored-by: Matt Daleo <12395090+mazelado@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-24 15:22:03 +02:00
CanbiZ (MickLesk) c91c0e6597 Immich Public Proxy: optional visitor upload service (#17875)
IPP 4.0 lets visitors upload through a second, optional app in the same
repository. The addon now builds the whole workspace, so upload-app is
always ready, and can run it as immich-proxy-upload on port 3001: asked
on install (var_ipp_uploads), offered in the menu of an existing
install, rebuilt and restarted on update with its config.json kept, and
removed on uninstall. It stays off unless chosen.
2026-10-12 10:00:25 +02:00
CanbiZ (MickLesk) 969cc5e9b8 FileBrowser Quantum: migrate the config and database to v2 (#17815)
v2.0.0 reads the config strictly and stops at the v1 keys the addon
wrote (server.port, conditionals, indexingIntervalMinutes). It also only
imports the old BoltDB when server.database.migrateFrom names it and no
database.db is left in the working directory. The update now rewrites
the config, renames the database and points migrateFrom at it, keeping
a copy of the v1 config. New installs write the v2 layout.
2026-10-09 21:24:00 +02:00
Jason O'Brien aaa341b6b2 monitor-all: read container IP from the host side (#17686)
The CT check resolved the IP by running ip inside the guest via pct
exec, which depends on the guest having it installed. If not, this
always comes back empty, so the container is restarted every cycle
despite answering ping. lxc-info reports the addresses from the
host without running anything inside the guest.

Fixes #17685
2026-10-05 08:16:45 +02:00
CanbiZ (MickLesk) 7f57d0998c Refactor/core qol adoption (#17655)
* Scripts: close every msg_info block with msg_ok

Past-tense msg_info calls that should have been msg_ok, notices that opened a block before a prompt, and blocks without a closing msg_ok. These already left a stale spinner; with core's block stack they would resume it after every later msg_ok.

* Generate passwords with random_password

openssl rand -base64 | tr -dc | head -c returned fewer characters than asked for, and the unfiltered | cut variants put / and + into passwords that end up in DSNs and sed expressions. Secrets an app decodes as base64 are unchanged. Requires community-scripts/core#61.

* Keep data directories through CLEAN_INSTALL instead of copying them

create_backup copied uploads, storage and similar directories twice per update and needed their size again in free space. CLEAN_INSTALL_KEEP moves them aside instead. Only directories the upstream release does not ship, in scripts that restored right after the fetch. Requires community-scripts/core#61.

* Drop the 300s uv timeout overrides

setup_uv exports UV_HTTP_TIMEOUT=600 now; the scripts' 300 only lowered it. Requires community-scripts/core#61.
2026-10-03 08:19:10 +02:00
CanbiZ (MickLesk) 823e026952 tools, turnkey: load core instead of the legacy misc functions (#17621)
Addons now draw their banner from core's headers/, so tools/headers goes too.
2026-10-01 08:15:12 +02:00
CanbiZ (MickLesk) 8fdc522129 all-templates: handle the arch column of pveam available (#17579) 2026-09-29 15:17:27 +02:00
CanbiZ (MickLesk) dce092a0a4 Komodo: add KOMODO_HOST | fix broken spinner (#17481)
* Check Komodo actually started and point KOMODO_HOST at the container

* Stop Komodo hanging on an unclosed message block
2026-09-26 20:49:03 +02:00
CanbiZ (MickLesk) fbea9c04c3 monitor-all: decide on flag values, not on key presence (#17261) 2026-09-15 09:16:12 +02:00
community-scripts-pr-app[bot] 6b30d4462d Update .app files (#17194)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-09-11 10:18:07 +02:00
push-app-to-main[bot] b875f780bb Dockhand (#17191)
* Add dockhand (addon)

* Revise copyright and license details in dockhand.sh

---------

Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
Co-authored-by: Tobias <96661824+CrazyWolf13@users.noreply.github.com>
2026-09-11 10:17:05 +02:00
CanbiZ (MickLesk) c001360b2d Rename lxc-delete.sh to guest-delete.sh (#17152) 2026-09-11 07:42:12 +02:00
CanbiZ (MickLesk) 7304dec635 update-apps: rewrite the retired Gitea base in every container before updating it (#17156) 2026-09-11 07:40:57 +02:00
MickLesk cca5e8320a lxc-delete: also delete VMs, not just containers
One checklist now lists containers and VMs side by side, each tagged with its
type, with separate ALL CT / ALL VM entries. VMs stop via qm stop and are
removed with qm destroy --purge --destroy-unreferenced-disks.

Two fixes fall out of the rework: the destroy exit status is read from the
background job rather than from the spinner, so failures actually surface, and
a guest is only stopped once its deletion is confirmed.
2026-09-10 10:38:39 +02:00
CanbiZ (MickLesk) 9c750ffaf5 update-apps: follow renamed ct/ scripts instead of erroring out (#16991)
A container keeps the slug it was built with, so a renamed ct/ script leaves
the updater looking for a name that no longer exists.

Reported for pbs, renamed to proxmox-backup-server in 0e5f663df. The Alpine
merge on 2026-08-18 retired 29 more names the same way, so every container
installed from an alpine-* script before that date hits this too.

Candidates are only accepted when the target script really exists, so an
unknown slug still errors rather than running some other app's updater.

Fixes #16989
2026-09-05 13:04:27 +10:00
Phill Fernandes a9255417d4 fix(add-iptag): merge live IPv4 addresses for running LXCs (#16691) 2026-09-01 14:50:21 +02:00
CanbiZ (MickLesk) cecd3222fc filebrowser-quantum: strip removed disableIndexing key on update, restart service (#16892) 2026-08-31 09:40:58 +02:00
CanbiZ (MickLesk) c152912552 general: remove gitea links overall (#16863)
* docker-vm, pve-privilege-converter: source from GitHub raw instead of gitea mirror

* docker-vm, pve-privilege-converter, vm-core.func: source from GitHub raw instead of gitea mirror
2026-08-30 12:52:43 +02:00
Michel Roegl-Brunner 07d1f0837d Fix: Incorporate the new update functions to prevent a empty grep on … (#16809)
* Fix: Incorporate the new update functions to prevent a empty grep on the legacy link in /usr/bin/update

* Remove outdated comments from update-apps.sh

Removed comments regarding the new-style entrypoint and fallback logic for service extraction.

---------

Co-authored-by: CanbiZ (MickLesk) <47820557+MickLesk@users.noreply.github.com>
2026-08-27 10:05:08 +02:00
CanbiZ (MickLesk) 8854585a1a Migrate the (remaining) Top 25 scripts to the new core engine (#16749)
* Move the top 25 scripts onto the core engine

The engine work of the last few days reaches 30 of 561 ct scripts, about 5% of
ProxmoxVE traffic: retry on engine downloads, exit 227 instead of a misfiled
dpkg error, the umask fix that stops a hardened host producing containers apt
cannot resolve in, the TMPDIR guard, the toolchain restore. All of it has been
sitting where almost nobody runs it.

All eighteen at once rather than in waves. A slow rollout does not exercise the
paths only some scripts take, and broad exposure is what surfaces bugs -- a
deliberate call about release risk.

Checked before touching anything, because "migrate" meant far more than a line
swap last time:

  - None of the eighteen has an alpine-* variant, so there is no merge to do.
  - No script references misc/ outside its bootstrap line.
  - Of the 61 functions that exist only in misc/, none is called by any of them.

So it is one line per script, and every head is now byte-identical to the ones
migrated earlier. With these, ProxmoxVE goes from 30 scripts on the core engine
to 48 -- and from roughly 5% of traffic to the majority, since these are the
ones people actually install.

Two to watch: immich sits at 44.7% success and vaultwarden at 42.1% before
this. If their numbers move, the engine is one of two changed variables rather
than the only one.

* Move update-apps onto the core engine

Entry 11 of the list and the only one that is not a ct script, so it was left
out of the previous commit. It is a host tool: it never used build.func at all,
it sources misc/core.func and misc/api.func directly.

The swap is therefore two lines rather than one, and worth checking rather than
assuming. It uses exactly five engine functions -- header_info,
init_tool_telemetry, msg_info, msg_ok, msg_error -- all present in the core, and
both files load standalone, which they had not had to do before: everywhere else
they arrive through build.func.

That completes the list. All 25 now run on the core engine.

Fixing this one matters beyond the migration: update-apps is what drives
unattended updates across every container on a host, and it is the path where
PHS_SILENT was being ignored (#16593). It now gets the engine that honours it.
2026-08-25 11:04:15 +02:00
CanbiZ (MickLesk) d1dd9e18e4 post-pve/pbs-install: fix component_exists_in_sources matching substrings of hyphenated tokens (#16709)
* post-pve-install: fix component_exists_in_sources matching substrings of hyphenated tokens

* post-pbs-install: fix component_exists_in_sources matching substrings of hyphenated tokens
2026-08-24 13:45:15 +02:00
CanbiZ (MickLesk) b685312cb8 copyparty: use fetch_and_deploy_gh_release for version tracking (#16624) 2026-08-20 14:28:01 +02:00
CanbiZ (MickLesk) 3ac1f1dfd4 cronmaster: back up scripts, data and snippets folders on update (#16529) 2026-08-16 20:34:55 +02:00
CanbiZ (MickLesk) f3bdffbeac arcane: fix projects/builds dir ownership for non-root container UID (#16411) 2026-08-11 21:38:55 +02:00
Adam Camp 7f913fa083 fix(add-tailscale-lxc): stop spinner before whiptail menu (#16402)
msg_info starts a background spinner while loading the container list,
but the script never stops it before opening the interactive radiolist,
so the spinner keeps repainting over the UI.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-11 10:40:56 +02:00
push-app-to-main[bot] d734d2204f Add post-pdm-install (pve) (#16368)
Co-authored-by: push-app-to-main[bot] <203845782+push-app-to-main[bot]@users.noreply.github.com>
2026-08-10 10:04:51 +10:00
CanbiZ (MickLesk) 3ed946390f Portainer: Update existing CE and BE installations (#16357) 2026-08-09 20:22:40 +02:00
CanbiZ (MickLesk) 0092fa8b54 Docker: report container updates instead of prompting, stop auto-updating Portainer Agent, fix addon detection of legacy Portainer (#16298)
* Docker: report container updates instead of prompting, stop auto-updating Portainer Agent, fix addon detection of legacy Portainer

* Update portainer.sh
2026-08-07 19:43:32 +10:00
Sam Heinz fb1d670158 dont skip enterprise repo setup on arm64 (#16307) 2026-08-06 21:02:43 +02:00
jomplox f4afdfcd0c fix(monitor-all): reduce polling CPU overhead (#15907) 2026-08-05 22:35:03 +02:00
community-scripts-pr-app[bot] 26abc114fd Update .app files (#16269)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-08-04 21:06:45 +02:00
CanbiZ (MickLesk) 86d67affa3 Refactor: harmonize tools/addon and move boilerplate into core.func (#16202) 2026-08-04 21:02:03 +02:00
community-scripts-pr-app[bot] 6ce8062e3d Update .app files (#16227)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-08-02 20:52:56 +02:00
CanbiZ (MickLesk) 753f74c67d Portainer as Addon (#16200)
* New Script: Portainer

* author
2026-08-02 19:57:42 +02:00
Tobias 645f6a2d9a fix: prometheus-paperless-exporter incompatibility with paperless v3 (#16119)
* fix: compatibility in paperless v3 (https://github.com/hansmi/prometheus-paperless-exporter/issues/134)

* rm: comments

* fix: revert func
2026-07-29 09:29:16 +10:00
community-scripts-pr-app[bot] 57e02eee1b Update .app files (#16114)
Co-authored-by: GitHub Actions <github-actions[bot]@users.noreply.github.com>
2026-07-28 13:38:55 +02:00