Compare commits

..

1 Commits

Author SHA1 Message Date
Sam Heinz 791cf7af1e backup virtual printer in bambuddy 2026-07-29 11:52:57 +10:00
5 changed files with 18 additions and 80 deletions
-2
View File
@@ -508,8 +508,6 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
</details>
## 2026-07-29
## 2026-07-28
### 🚀 Updated Scripts
+2 -1
View File
@@ -42,7 +42,8 @@ function update_script() {
/opt/bambuddy/data \
/opt/bambuddy/bambuddy.db \
/opt/bambuddy/bambutrack.db \
/opt/bambuddy/archive
/opt/bambuddy/archive \
/opt/bambuddy/virtual_printer
msg_ok "Backed up Configuration and Data"
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "bambuddy" "maziggy/bambuddy" "tarball" "latest" "/opt/bambuddy"
+2 -23
View File
@@ -10,29 +10,8 @@ fi
# must write local failure artifacts instead of talking to the telemetry API
# (the host is the single telemetry reporter).
export TELEMETRY_CONTEXT="container"
# A freshly booted container may not have DNS up yet. `source <(curl ...)` hides
# curl's exit code, so a failed download would silently source an empty stream.
_bootstrap_die() {
if declare -f msg_error >/dev/null 2>&1; then
msg_error "$1"
else
echo "FATAL: $1" >&2
fi
exit 115
}
_bootstrap_source() {
local url="$1" probe="$2" content
content=$(curl -fsSL --connect-timeout 10 --retry 5 --retry-connrefused --retry-delay 2 "$url") ||
_bootstrap_die "Failed to download ${url##*/}"
source /dev/stdin <<<"$content"
declare -f "$probe" >/dev/null 2>&1 ||
_bootstrap_die "${url##*/} loaded but incomplete (missing ${probe})"
}
_FUNC_BASE="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc"
_bootstrap_source "$_FUNC_BASE/core.func" load_functions
_bootstrap_source "$_FUNC_BASE/error_handler.func" catch_errors
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
load_functions
catch_errors
+12 -31
View File
@@ -88,38 +88,19 @@ variables() {
fi
}
# `source <(curl ...)` hides the download exit code, so a failed fetch would
# silently source an empty stream and leave the helpers undefined.
_bootstrap_die() {
if declare -f msg_error >/dev/null 2>&1; then
msg_error "$1"
else
echo "FATAL: $1" >&2
fi
exit 115
}
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func)
_bootstrap_source() {
local url="$1" probe="$2" content=""
if command -v curl >/dev/null 2>&1; then
content=$(curl -fsSL --connect-timeout 10 --retry 5 --retry-connrefused --retry-delay 2 "$url") || content=""
elif command -v wget >/dev/null 2>&1; then
content=$(wget -qO- --tries=5 --timeout=10 "$url") || content=""
else
_bootstrap_die "Neither curl nor wget available"
fi
[[ -n "$content" ]] || _bootstrap_die "Failed to download ${url##*/}"
source /dev/stdin <<<"$content"
declare -f "$probe" >/dev/null 2>&1 ||
_bootstrap_die "${url##*/} loaded but incomplete (missing ${probe})"
}
_FUNC_BASE="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc"
_bootstrap_source "$_FUNC_BASE/api.func" post_to_api
_bootstrap_source "$_FUNC_BASE/core.func" load_functions
_bootstrap_source "$_FUNC_BASE/error_handler.func" catch_errors
load_functions
catch_errors
if command -v curl >/dev/null 2>&1; then
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
load_functions
catch_errors
elif command -v wget >/dev/null 2>&1; then
source <(wget -qO- https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
source <(wget -qO- https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
load_functions
catch_errors
fi
# ==============================================================================
# SECTION 2: PRE-FLIGHT CHECKS & SYSTEM VALIDATION
+2 -23
View File
@@ -37,29 +37,8 @@ fi
# (the host is the single telemetry reporter).
export TELEMETRY_CONTEXT="container"
# A freshly booted container may not have DNS up yet. `source <(curl ...)` hides
# curl's exit code, so a failed download would silently source an empty stream.
_bootstrap_die() {
if declare -f msg_error >/dev/null 2>&1; then
msg_error "$1"
else
echo "FATAL: $1" >&2
fi
exit 115
}
_bootstrap_source() {
local url="$1" probe="$2" content
content=$(curl -fsSL --connect-timeout 10 --retry 5 --retry-connrefused --retry-delay 2 "$url") ||
_bootstrap_die "Failed to download ${url##*/}"
source /dev/stdin <<<"$content"
declare -f "$probe" >/dev/null 2>&1 ||
_bootstrap_die "${url##*/} loaded but incomplete (missing ${probe})"
}
_FUNC_BASE="https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc"
_bootstrap_source "$_FUNC_BASE/core.func" load_functions
_bootstrap_source "$_FUNC_BASE/error_handler.func" catch_errors
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/core.func)
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
load_functions
catch_errors