SHA256
make full_usage aware of possible PBC setting in config
This commit is contained in:
@@ -38,8 +38,6 @@ function full_usage() {
|
|||||||
echo "Commands of proxmox-backup-client:"
|
echo "Commands of proxmox-backup-client:"
|
||||||
echo
|
echo
|
||||||
"$PBC" help | tail -n +3
|
"$PBC" help | tail -n +3
|
||||||
echo
|
|
||||||
return $?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function pbc-version() {
|
function pbc-version() {
|
||||||
@@ -205,6 +203,8 @@ PBC=$(command -v proxmox-backup-client)
|
|||||||
PBC_DOWNLOAD_URL='http://download.proxmox.com/debian/pbs-client/dists/trixie/main/binary-amd64'
|
PBC_DOWNLOAD_URL='http://download.proxmox.com/debian/pbs-client/dists/trixie/main/binary-amd64'
|
||||||
ETC_DIR="/etc/$SCRIPT"
|
ETC_DIR="/etc/$SCRIPT"
|
||||||
|
|
||||||
|
FULL_HELP=false
|
||||||
|
|
||||||
action=''
|
action=''
|
||||||
cfgfile="$ETC_DIR/config"
|
cfgfile="$ETC_DIR/config"
|
||||||
args=()
|
args=()
|
||||||
@@ -224,8 +224,7 @@ while [ -n "$1" ]; do
|
|||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
-H|--full-help)
|
-H|--full-help)
|
||||||
full_usage
|
FULL_HELP=true
|
||||||
exit 0
|
|
||||||
;;
|
;;
|
||||||
-*)
|
-*)
|
||||||
echo "Error: invalid option: $opt" >&2
|
echo "Error: invalid option: $opt" >&2
|
||||||
@@ -261,6 +260,13 @@ while [ -n "$1" ]; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
|
|
||||||
|
if $FULL_HELP; then
|
||||||
|
[ -f "$cfgfile" ] && source "$cfgfile"
|
||||||
|
PBC=${PBC:-/usr/local/bin/proxmox-backup-client}
|
||||||
|
full_usage
|
||||||
|
exit $?
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$action" == 'install' ]; then
|
if [ "$action" == 'install' ]; then
|
||||||
if [ -f "$cfgfile" ]; then
|
if [ -f "$cfgfile" ]; then
|
||||||
source "$cfgfile" || exit $?
|
source "$cfgfile" || exit $?
|
||||||
|
|||||||
Reference in New Issue
Block a user