Exit if /etc/pve doesn't exist

This commit is contained in:
Jeremy Gardais 2021-04-12 16:19:03 +02:00
parent b8d3c9554f
commit e872fdafaf
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 7 additions and 0 deletions

View File

@ -97,6 +97,13 @@ main() { # {{{
## Define all 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 {{{
### AND create it
is_directory_absent "${local_bkp_dir}" \