2
0
Fork 0

various changes

main
Ducky 2022-02-23 05:14:53 +00:00
parent 0397127de1
commit 8f5e485d45
3 changed files with 18 additions and 1 deletions

9
.gitignore vendored
View File

@ -28,3 +28,12 @@
/usr/local/sbin/* /usr/local/sbin/*
!/usr/local/sbin/update-rootfs !/usr/local/sbin/update-rootfs
!/usr/local/sbin/zio-backup !/usr/local/sbin/zio-backup
# /var/
!/var/
/var/*
# /var/zio-backup/
!/var/zio-backup/
/var/zio-backup/*
!/var/zio-backup/passwd

View File

@ -30,11 +30,11 @@ function backup() {
--iexclude "tmp" \ --iexclude "tmp" \
--exclude-if-present ".nobackup" \ --exclude-if-present ".nobackup" \
--hostname "$host" \ --hostname "$host" \
--password-file "$passwd_file" \
--repo "$repo" \ --repo "$repo" \
--tag "$tag" \ --tag "$tag" \
--verbose \ --verbose \
`[[ -s $args ]] && echo "$args"` "$path" \ `[[ -s $args ]] && echo "$args"` "$path" \
--dry-run
fi fi
} }
@ -75,6 +75,7 @@ function test_path() {
host="de01" host="de01"
repo="b2:zio-euc-servers" repo="b2:zio-euc-servers"
passwd_file=""
pre_script="" pre_script=""
post_script="" post_script=""
services=() services=()
@ -89,6 +90,12 @@ else
[[ ! -z $(get_prop "$env_dir/$host.var" SERVICES) ]] && \ [[ ! -z $(get_prop "$env_dir/$host.var" SERVICES) ]] && \
IFS=';' read -ra services <<< "$(get_prop "$env_dir/$host.var" SERVICES)" IFS=';' read -ra services <<< "$(get_prop "$env_dir/$host.var" SERVICES)"
fi fi
if [[ -f "$env_dir/passwd" ]]; then
passwd_file="$env_dir/passwd"
else
say_warn "Password file ($passwd_file) not found."
fi
fi fi
if [[ ! -z $pre_script ]]; then if [[ ! -z $pre_script ]]; then

View File

@ -0,0 +1 @@
9%62hqWZwgLWEJ4@k7gG3*o4Zt#%dBiA