Exit if /etc/pve doesn't exist
This commit is contained in:
parent
b8d3c9554f
commit
e872fdafaf
|
@ -97,6 +97,13 @@ main() { # {{{
|
||||||
## Define all vars
|
## Define all vars
|
||||||
define_vars
|
define_vars
|
||||||
|
|
||||||
|
## Verify if /etc/pve directory is absent {{{
|
||||||
|
### Display an explicit error message
|
||||||
|
### AND exit with error code 1
|
||||||
|
is_directory_absent /etc/pve \
|
||||||
|
&& printf '%b\n' "${RED}/etc/pve directory doesn't seems available. Are you sure you run this script on a Proxmox host?${RESET}" \
|
||||||
|
&& exit 1
|
||||||
|
## }}}
|
||||||
## Verify if the local destination directory is absent {{{
|
## Verify if the local destination directory is absent {{{
|
||||||
### AND create it
|
### AND create it
|
||||||
is_directory_absent "${local_bkp_dir}" \
|
is_directory_absent "${local_bkp_dir}" \
|
||||||
|
|
Loading…
Reference in New Issue