mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2026-02-12 16:23:26 +01:00
Compare commits
7 Commits
refactor/u
...
wealthfoli
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a9594aee7 | ||
|
|
b65b8a2ffa | ||
|
|
97cb1ac7e2 | ||
|
|
47b445bdb1 | ||
|
|
a2b27c9ff8 | ||
|
|
4dbb139c60 | ||
|
|
c581704fdd |
@@ -407,6 +407,12 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
|
||||
|
||||
- paperless-exporter ([#11737](https://github.com/community-scripts/ProxmoxVE/pull/11737))
|
||||
|
||||
### 🌐 Website
|
||||
|
||||
- #### 📝 Script Information
|
||||
|
||||
- Snowshare: fix typo in config file path on website [@BirdMakingStuff](https://github.com/BirdMakingStuff) ([#11754](https://github.com/community-scripts/ProxmoxVE/pull/11754))
|
||||
|
||||
## 2026-02-09
|
||||
|
||||
### 🚀 Updated Scripts
|
||||
|
||||
@@ -43,16 +43,15 @@ function update_script() {
|
||||
|
||||
msg_info "Building Frontend (patience)"
|
||||
cd /opt/wealthfolio
|
||||
export BUILD_TARGET=web
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm tsc
|
||||
$STD pnpm vite build
|
||||
$STD pnpm --filter frontend... build
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Building Backend (patience)"
|
||||
cd /opt/wealthfolio/src-server
|
||||
source ~/.cargo/env
|
||||
$STD cargo build --release --manifest-path Cargo.toml
|
||||
cp /opt/wealthfolio/src-server/target/release/wealthfolio-server /usr/local/bin/wealthfolio-server
|
||||
$STD cargo build --release --manifest-path apps/server/Cargo.toml
|
||||
cp /opt/wealthfolio/target/release/wealthfolio-server /usr/local/bin/wealthfolio-server
|
||||
chmod +x /usr/local/bin/wealthfolio-server
|
||||
msg_ok "Built Backend"
|
||||
|
||||
@@ -63,7 +62,7 @@ function update_script() {
|
||||
msg_ok "Restored Data"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/wealthfolio/src-server/target
|
||||
rm -rf /opt/wealthfolio/target
|
||||
rm -rf /root/.cargo/registry
|
||||
rm -rf /opt/wealthfolio/node_modules
|
||||
msg_ok "Cleaned Up"
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
"privileged": false,
|
||||
"interface_port": 3000,
|
||||
"documentation": "https://github.com/TuroYT/snowshare",
|
||||
"config_path": "/opt/snowshare/.env",
|
||||
"config_path": "/opt/snowshare.env",
|
||||
"website": "https://github.com/TuroYT/snowshare",
|
||||
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/png/snowshare.png",
|
||||
"description": "A modern, secure file and link sharing platform built with Next.js, Prisma, and NextAuth. Share URLs, code snippets, and files with customizable expiration, privacy, and QR codes.",
|
||||
|
||||
@@ -28,15 +28,15 @@ fetch_and_deploy_gh_release "wealthfolio" "afadil/wealthfolio" "tarball"
|
||||
|
||||
msg_info "Building Frontend (patience)"
|
||||
cd /opt/wealthfolio
|
||||
export BUILD_TARGET=web
|
||||
$STD pnpm install --frozen-lockfile
|
||||
$STD pnpm tsc
|
||||
$STD pnpm vite build
|
||||
$STD pnpm --filter frontend... build
|
||||
msg_ok "Built Frontend"
|
||||
|
||||
msg_info "Building Backend (patience)"
|
||||
cd /opt/wealthfolio/src-server
|
||||
$STD cargo build --release --manifest-path Cargo.toml
|
||||
cp /opt/wealthfolio/src-server/target/release/wealthfolio-server /usr/local/bin/wealthfolio-server
|
||||
source ~/.cargo/env
|
||||
$STD cargo build --release --manifest-path apps/server/Cargo.toml
|
||||
cp /opt/wealthfolio/target/release/wealthfolio-server /usr/local/bin/wealthfolio-server
|
||||
chmod +x /usr/local/bin/wealthfolio-server
|
||||
msg_ok "Built Backend"
|
||||
|
||||
@@ -58,7 +58,7 @@ echo "WF_PASSWORD=${WF_PASSWORD}" >~/wealthfolio.creds
|
||||
msg_ok "Configured Wealthfolio"
|
||||
|
||||
msg_info "Cleaning Up"
|
||||
rm -rf /opt/wealthfolio/src-server/target
|
||||
rm -rf /opt/wealthfolio/target
|
||||
rm -rf /root/.cargo/registry
|
||||
rm -rf /opt/wealthfolio/node_modules
|
||||
msg_ok "Cleaned Up"
|
||||
|
||||
@@ -2764,26 +2764,6 @@ Advanced:
|
||||
[[ "$APT_CACHER" == "yes" ]] && echo -e "${INFO}${BOLD}${DGN}APT Cacher: ${BGN}$APT_CACHER_IP${CL}"
|
||||
echo -e "${SEARCH}${BOLD}${DGN}Verbose Mode: ${BGN}$VERBOSE${CL}"
|
||||
echo -e "${CREATING}${BOLD}${RD}Creating an LXC of ${APP} using the above advanced settings${CL}"
|
||||
|
||||
# Log settings to file
|
||||
log_section "CONTAINER SETTINGS (ADVANCED) - ${APP}"
|
||||
log_msg "Application: ${APP}"
|
||||
log_msg "PVE Version: ${PVEVERSION} (Kernel: ${KERNEL_VERSION})"
|
||||
log_msg "Operating System: $var_os ($var_version)"
|
||||
log_msg "Container Type: $([ "$CT_TYPE" == "1" ] && echo "Unprivileged" || echo "Privileged")"
|
||||
log_msg "Container ID: $CT_ID"
|
||||
log_msg "Hostname: $HN"
|
||||
log_msg "Disk Size: ${DISK_SIZE} GB"
|
||||
log_msg "CPU Cores: $CORE_COUNT"
|
||||
log_msg "RAM Size: ${RAM_SIZE} MiB"
|
||||
log_msg "Bridge: $BRG"
|
||||
log_msg "IPv4: $NET"
|
||||
log_msg "IPv6: $IPV6_METHOD"
|
||||
log_msg "FUSE Support: ${ENABLE_FUSE:-no}"
|
||||
log_msg "Nesting: $([ "${ENABLE_NESTING:-1}" == "1" ] && echo "Enabled" || echo "Disabled")"
|
||||
log_msg "GPU Passthrough: ${ENABLE_GPU:-no}"
|
||||
log_msg "Verbose Mode: $VERBOSE"
|
||||
log_msg "Session ID: ${SESSION_ID}"
|
||||
}
|
||||
|
||||
# ==============================================================================
|
||||
@@ -2891,7 +2871,6 @@ diagnostics_menu() {
|
||||
# - Prints summary of default values (ID, OS, type, disk, RAM, CPU, etc.)
|
||||
# - Uses icons and formatting for readability
|
||||
# - Convert CT_TYPE to description
|
||||
# - Also logs settings to log file for debugging
|
||||
# ------------------------------------------------------------------------------
|
||||
echo_default() {
|
||||
CT_TYPE_DESC="Unprivileged"
|
||||
@@ -2913,20 +2892,6 @@ echo_default() {
|
||||
fi
|
||||
echo -e "${CREATING}${BOLD}${BL}Creating a ${APP} LXC using the above default settings${CL}"
|
||||
echo -e " "
|
||||
|
||||
# Log settings to file
|
||||
log_section "CONTAINER SETTINGS - ${APP}"
|
||||
log_msg "Application: ${APP}"
|
||||
log_msg "PVE Version: ${PVEVERSION} (Kernel: ${KERNEL_VERSION})"
|
||||
log_msg "Container ID: ${CT_ID}"
|
||||
log_msg "Operating System: $var_os ($var_version)"
|
||||
log_msg "Container Type: $CT_TYPE_DESC"
|
||||
log_msg "Disk Size: ${DISK_SIZE} GB"
|
||||
log_msg "CPU Cores: ${CORE_COUNT}"
|
||||
log_msg "RAM Size: ${RAM_SIZE} MiB"
|
||||
[[ -n "${var_gpu:-}" && "${var_gpu}" == "yes" ]] && log_msg "GPU Passthrough: Enabled"
|
||||
[[ "$VERBOSE" == "yes" ]] && log_msg "Verbose Mode: Enabled"
|
||||
log_msg "Session ID: ${SESSION_ID}"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -4078,49 +4043,22 @@ EOF'
|
||||
# Copy both logs from container before potential deletion
|
||||
local build_log_copied=false
|
||||
local install_log_copied=false
|
||||
local combined_log="/tmp/${NSAPP:-lxc}-${CTID}-${SESSION_ID}.log"
|
||||
|
||||
if [[ -n "$CTID" && -n "${SESSION_ID:-}" ]]; then
|
||||
# Create combined log with header
|
||||
{
|
||||
echo "================================================================================"
|
||||
echo "COMBINED INSTALLATION LOG - ${APP:-LXC}"
|
||||
echo "Container ID: ${CTID}"
|
||||
echo "Session ID: ${SESSION_ID}"
|
||||
echo "Timestamp: $(date '+%Y-%m-%d %H:%M:%S')"
|
||||
echo "================================================================================"
|
||||
echo ""
|
||||
} > "$combined_log"
|
||||
|
||||
# Append BUILD_LOG (host-side creation log) if it exists
|
||||
# Copy BUILD_LOG (creation log) if it exists
|
||||
if [[ -f "${BUILD_LOG}" ]]; then
|
||||
{
|
||||
echo "================================================================================"
|
||||
echo "PHASE 1: CONTAINER CREATION (Host)"
|
||||
echo "================================================================================"
|
||||
cat "${BUILD_LOG}"
|
||||
echo ""
|
||||
} >> "$combined_log"
|
||||
build_log_copied=true
|
||||
cp "${BUILD_LOG}" "/tmp/create-lxc-${CTID}-${SESSION_ID}.log" 2>/dev/null && build_log_copied=true
|
||||
fi
|
||||
|
||||
# Copy and append INSTALL_LOG from container
|
||||
local temp_install_log="/tmp/.install-temp-${SESSION_ID}.log"
|
||||
if pct pull "$CTID" "/root/.install-${SESSION_ID}.log" "$temp_install_log" 2>/dev/null; then
|
||||
{
|
||||
echo "================================================================================"
|
||||
echo "PHASE 2: APPLICATION INSTALLATION (Container)"
|
||||
echo "================================================================================"
|
||||
cat "$temp_install_log"
|
||||
echo ""
|
||||
} >> "$combined_log"
|
||||
rm -f "$temp_install_log"
|
||||
# Copy INSTALL_LOG from container
|
||||
if pct pull "$CTID" "/root/.install-${SESSION_ID}.log" "/tmp/install-lxc-${CTID}-${SESSION_ID}.log" 2>/dev/null; then
|
||||
install_log_copied=true
|
||||
fi
|
||||
|
||||
# Show combined log location
|
||||
# Show available logs
|
||||
echo ""
|
||||
echo -e "${GN}✔${CL} Installation log: ${BL}${combined_log}${CL}"
|
||||
[[ "$build_log_copied" == true ]] && echo -e "${GN}✔${CL} Container creation log: ${BL}/tmp/create-lxc-${CTID}-${SESSION_ID}.log${CL}"
|
||||
[[ "$install_log_copied" == true ]] && echo -e "${GN}✔${CL} Installation log: ${BL}/tmp/install-lxc-${CTID}-${SESSION_ID}.log${CL}"
|
||||
fi
|
||||
|
||||
# Dev mode: Keep container or open breakpoint shell
|
||||
|
||||
@@ -413,69 +413,6 @@ get_active_logfile() {
|
||||
# Legacy compatibility: SILENT_LOGFILE points to active log
|
||||
SILENT_LOGFILE="$(get_active_logfile)"
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# strip_ansi()
|
||||
#
|
||||
# - Removes ANSI escape sequences from input text
|
||||
# - Used to clean colored output for log files
|
||||
# - Handles both piped input and arguments
|
||||
# ------------------------------------------------------------------------------
|
||||
strip_ansi() {
|
||||
if [[ $# -gt 0 ]]; then
|
||||
echo -e "$*" | sed 's/\x1b\[[0-9;]*m//g; s/\x1b\[[0-9;]*[a-zA-Z]//g'
|
||||
else
|
||||
sed 's/\x1b\[[0-9;]*m//g; s/\x1b\[[0-9;]*[a-zA-Z]//g'
|
||||
fi
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# log_msg()
|
||||
#
|
||||
# - Writes message to active log file without ANSI codes
|
||||
# - Adds timestamp prefix for log correlation
|
||||
# - Creates log file if it doesn't exist
|
||||
# - Arguments: message text (can include ANSI codes, will be stripped)
|
||||
# ------------------------------------------------------------------------------
|
||||
log_msg() {
|
||||
local msg="$*"
|
||||
local logfile
|
||||
logfile="$(get_active_logfile)"
|
||||
|
||||
[[ -z "$msg" ]] && return
|
||||
[[ -z "$logfile" ]] && return
|
||||
|
||||
# Ensure log directory exists
|
||||
mkdir -p "$(dirname "$logfile")" 2>/dev/null || true
|
||||
|
||||
# Strip ANSI codes and write with timestamp
|
||||
local clean_msg
|
||||
clean_msg=$(strip_ansi "$msg")
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $clean_msg" >>"$logfile"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# log_section()
|
||||
#
|
||||
# - Writes a section header to the log file
|
||||
# - Used for separating different phases of installation
|
||||
# - Arguments: section name
|
||||
# ------------------------------------------------------------------------------
|
||||
log_section() {
|
||||
local section="$1"
|
||||
local logfile
|
||||
logfile="$(get_active_logfile)"
|
||||
|
||||
[[ -z "$logfile" ]] && return
|
||||
mkdir -p "$(dirname "$logfile")" 2>/dev/null || true
|
||||
|
||||
{
|
||||
echo ""
|
||||
echo "================================================================================"
|
||||
echo "[$(date '+%Y-%m-%d %H:%M:%S')] $section"
|
||||
echo "================================================================================"
|
||||
} >>"$logfile"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# silent()
|
||||
#
|
||||
@@ -618,9 +555,6 @@ msg_info() {
|
||||
[[ -n "${MSG_INFO_SHOWN["$msg"]+x}" ]] && return
|
||||
MSG_INFO_SHOWN["$msg"]=1
|
||||
|
||||
# Log to file
|
||||
log_msg "[INFO] $msg"
|
||||
|
||||
stop_spinner
|
||||
SPINNER_MSG="$msg"
|
||||
|
||||
@@ -664,7 +598,6 @@ msg_ok() {
|
||||
stop_spinner
|
||||
clear_line
|
||||
echo -e "$CM ${GN}${msg}${CL}"
|
||||
log_msg "[OK] $msg"
|
||||
unset MSG_INFO_SHOWN["$msg"]
|
||||
}
|
||||
|
||||
@@ -680,7 +613,6 @@ msg_error() {
|
||||
stop_spinner
|
||||
local msg="$1"
|
||||
echo -e "${BFR:-}${CROSS:-✖️} ${RD}${msg}${CL}" >&2
|
||||
log_msg "[ERROR] $msg"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -695,7 +627,6 @@ msg_warn() {
|
||||
stop_spinner
|
||||
local msg="$1"
|
||||
echo -e "${BFR:-}${INFO:-ℹ️} ${YWB}${msg}${CL}" >&2
|
||||
log_msg "[WARN] $msg"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@@ -713,7 +644,6 @@ msg_custom() {
|
||||
[[ -z "$msg" ]] && return
|
||||
stop_spinner
|
||||
echo -e "${BFR:-} ${symbol} ${color}${msg}${CL:-\e[0m}"
|
||||
log_msg "$msg"
|
||||
}
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user