Refactor qbittorrent-exporter.sh to remove redundancy

Removed duplicate function source calls and header_info invocation.
This commit is contained in:
Tobias 2025-11-21 09:57:43 +01:00 committed by GitHub
parent e7006f788d
commit 1cc22bd070
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -4,6 +4,9 @@
# Author: CrazWolf13 # Author: CrazWolf13
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
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/tools.func)
header_info
APP="qbittorrent-exporter" APP="qbittorrent-exporter"
INSTALL_PATH="/opt/qbittorrent-exporter/src/qbittorrent-exporter" INSTALL_PATH="/opt/qbittorrent-exporter/src/qbittorrent-exporter"
@ -31,10 +34,6 @@ else
exit 1 exit 1
fi fi
header_info
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/tools.func)
# Existing installation # Existing installation
if [[ -f "$INSTALL_PATH" ]]; then if [[ -f "$INSTALL_PATH" ]]; then
echo -e "${YW}⚠️ ${APP} is already installed.${CL}" echo -e "${YW}⚠️ ${APP} is already installed.${CL}"