Skip to content

Commit 24a15d2

Browse files
authored
fix: Init telemetry in addon scripts (#12777)
* Init telemetry in addon scripts Add a guarded call to init_tool_telemetry at the top of multiple tools/addon scripts (if the function is defined) and remove the previous placeholder init_tool_telemetry "" "addon" calls later in the files. This initializes telemetry earlier with the proper tool name and avoids invoking the initializer with an empty name. Affected files include: adguardhome-sync, arcane, coolify, copyparty, cronmaster, dockge, dokploy, immich-public-proxy, jellystat, komodo, nextcloud-exporter, pihole-exporter, prometheus-paperless-ngx-exporter, qbittorrent-exporter, and runtipi. * Update umbrel-os-vm.sh
1 parent a9ebaad commit 24a15d2

16 files changed

Lines changed: 16 additions & 9 deletions

tools/addon/adguardhome-sync.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1818
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1919
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
2020
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
21+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "adguardhome-sync" "addon"
2122

2223
# Enable error handling
2324
set -Eeuo pipefail
@@ -34,7 +35,6 @@ DEFAULT_PORT=8080
3435

3536
# Initialize all core functions (colors, formatting, icons, STD mode)
3637
load_functions
37-
init_tool_telemetry "" "addon"
3838

3939
# ==============================================================================
4040
# HEADER

tools/addon/arcane.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1313
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1414
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
1515
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
16+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "arcane" "addon"
1617

1718
# Enable error handling
1819
set -Eeuo pipefail

tools/addon/coolify.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1818
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1919
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
2020
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
21+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "coolify" "addon"
2122

2223
# Enable error handling
2324
set -Eeuo pipefail

tools/addon/copyparty.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1414
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1515
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
1616
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
17+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "copyparty" "addon"
1718

1819
# Enable error handling
1920
set -Eeuo pipefail
2021
trap 'error_handler' ERR
2122
load_functions
22-
init_tool_telemetry "" "addon"
2323

2424
# ==============================================================================
2525
# CONFIGURATION

tools/addon/cronmaster.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1414
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1515
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
1616
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
17+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "cronmaster" "addon"
1718

1819
# Enable error handling
1920
set -Eeuo pipefail
2021
trap 'error_handler' ERR
2122
load_functions
22-
init_tool_telemetry "" "addon"
2323

2424
# ==============================================================================
2525
# CONFIGURATION

tools/addon/dockge.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1818
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1919
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
2020
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
21+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "dockge" "addon"
2122

2223
# Enable error handling
2324
set -Eeuo pipefail

tools/addon/dokploy.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1818
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1919
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
2020
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
21+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "dokploy" "addon"
2122

2223
# Enable error handling
2324
set -Eeuo pipefail

tools/addon/immich-public-proxy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1414
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1515
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
1616
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
17+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "immich-public-proxy" "addon"
1718

1819
# Enable error handling
1920
set -Eeuo pipefail
@@ -30,7 +31,6 @@ DEFAULT_PORT=3000
3031

3132
# Initialize all core functions (colors, formatting, icons, $STD mode)
3233
load_functions
33-
init_tool_telemetry "" "addon"
3434

3535
# ==============================================================================
3636
# HEADER

tools/addon/jellystat.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1414
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1515
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
1616
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
17+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "jellystat" "addon"
1718

1819
# Enable error handling
1920
set -Eeuo pipefail
@@ -30,7 +31,6 @@ DEFAULT_PORT=3000
3031

3132
# Initialize all core functions (colors, formatting, icons, STD mode)
3233
load_functions
33-
init_tool_telemetry "" "addon"
3434

3535
# ==============================================================================
3636
# HEADER

tools/addon/komodo.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxV
1313
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/tools.func)
1414
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/error_handler.func)
1515
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/api.func) 2>/dev/null || true
16+
declare -f init_tool_telemetry &>/dev/null && init_tool_telemetry "komodo" "addon"
1617

1718
# Enable error handling
1819
set -Eeuo pipefail

0 commit comments

Comments
 (0)