SHA256
improve log messages
This commit is contained in:
@@ -119,12 +119,12 @@ function install_proxmox_backup_client() {
|
|||||||
if $installed && ! $update; then
|
if $installed && ! $update; then
|
||||||
local version=$("$PBC" version | head -n 1)
|
local version=$("$PBC" version | head -n 1)
|
||||||
(( $? != 0 )) && echo "Error running $PBC version: exited with rc=$?" >&2 && return 10
|
(( $? != 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
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if $update && dpkg -S "$PBC" &>/dev/null; then
|
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
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -142,18 +142,18 @@ function install_proxmox_backup_client() {
|
|||||||
TMPDIR=$(mktemp -d)
|
TMPDIR=$(mktemp -d)
|
||||||
trap cleanup_tmpdir EXIT
|
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
|
! 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
|
! 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
|
! cp "$TMPDIR/usr/bin/proxmox-backup-client" "$PBC" && echo "Error copying binary!" >&2 && return 60
|
||||||
|
|
||||||
local version=$(pbc-version) || return $?
|
local version=$(pbc-version) || return $?
|
||||||
$update && action='updated' || action='installed'
|
$update && action='updated' || action='installed'
|
||||||
echo "Successfully $action proxmox-backup-$version"
|
echo "Info: successfully $action proxmox-backup-$version"
|
||||||
|
|
||||||
cleanup_tmpdir
|
cleanup_tmpdir
|
||||||
}
|
}
|
||||||
@@ -394,7 +394,7 @@ case "$action" in
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Success!"
|
echo "Info: successfully installed pbc dependencies!"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
"$PBC" "$action" "${args[@]}" || exit $?
|
"$PBC" "$action" "${args[@]}" || exit $?
|
||||||
|
|||||||
Reference in New Issue
Block a user