diff --git a/usr/local/bin/sh.zio.backup b/usr/local/bin/sh.zio.backup index cdfbc9c..28b87f9 100755 --- a/usr/local/bin/sh.zio.backup +++ b/usr/local/bin/sh.zio.backup @@ -102,6 +102,7 @@ function invoke_script() { export -f get_config_dir export -f get_dump_dir export -f get_real_path + export -f get_secret export -f invoke_restic export -f podman_exec export -f prune_backup @@ -207,6 +208,14 @@ function get_dump_dir() { [[ $? == "0" ]] && echo "$specific_dumps_dir" } +function get_secret() { + secret_path="$secrets_dir/$1" + + if [[ -f "$1" ]]; then + cat "$secret_path" + fi +} + function start_service() { service="$1"