2
0
Fork 0

sh.zio.backup: add get_secret()

main
Ducky 2023-08-22 22:48:19 +01:00
parent d6773d29dc
commit 9a2f0783f1
1 changed files with 9 additions and 0 deletions

View File

@ -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"