improve log messages

This commit is contained in:
2026-08-22 02:12:13 +02:00
parent 37dbf61f07
commit 6a8b4b86f3
+7 -7
View File
@@ -119,12 +119,12 @@ function install_proxmox_backup_client() {
if $installed && ! $update; then
local version=$("$PBC" version | head -n 1)
(( $? != 0 )) && echo "Error running $PBC version: exited with rc=$?" >&2 && return 10
echo "Skip installation of proxmox-backup-client, already installed ($version)"
echo "Info: skip installation of proxmox-backup-client, already installed ($version)"
return 0
fi
if $update && dpkg -S "$PBC" &>/dev/null; then
echo "Skip update of proxmox-backup-client, package is managed by the package manager"
echo "Info: skip update of proxmox-backup-client, package is managed by the package manager"
return 0
fi
@@ -142,18 +142,18 @@ function install_proxmox_backup_client() {
TMPDIR=$(mktemp -d)
trap cleanup_tmpdir EXIT
echo "Downloading $PBC_DOWNLOAD_URL/$pkgfile ..."
echo "Info: downloading $PBC_DOWNLOAD_URL/$pkgfile ..."
! curl -s -o "$TMPDIR/$pkgfile" "$PBC_DOWNLOAD_URL/$pkgfile" && echo "Error downloading file!" >&2 && return 40
echo "Extracting $pkgfile ..."
echo "Info: extracting $pkgfile ..."
! dpkg-deb -x "$TMPDIR/$pkgfile" "$TMPDIR/" && echo "Error extracting file!" >&2 && return 50
echo "Copying proxmox-backup-client static binary to $PBC ..."
echo "Info: copying proxmox-backup-client static binary to $PBC ..."
! cp "$TMPDIR/usr/bin/proxmox-backup-client" "$PBC" && echo "Error copying binary!" >&2 && return 60
local version=$(pbc-version) || return $?
$update && action='updated' || action='installed'
echo "Successfully $action proxmox-backup-$version"
echo "Info: successfully $action proxmox-backup-$version"
cleanup_tmpdir
}
@@ -394,7 +394,7 @@ case "$action" in
fi
fi
echo "Success!"
echo "Info: successfully installed pbc dependencies!"
;;
*)
"$PBC" "$action" "${args[@]}" || exit $?