sh.zio.backup: add get_secret()
parent
d6773d29dc
commit
9a2f0783f1
|
@ -102,6 +102,7 @@ function invoke_script() {
|
||||||
export -f get_config_dir
|
export -f get_config_dir
|
||||||
export -f get_dump_dir
|
export -f get_dump_dir
|
||||||
export -f get_real_path
|
export -f get_real_path
|
||||||
|
export -f get_secret
|
||||||
export -f invoke_restic
|
export -f invoke_restic
|
||||||
export -f podman_exec
|
export -f podman_exec
|
||||||
export -f prune_backup
|
export -f prune_backup
|
||||||
|
@ -207,6 +208,14 @@ function get_dump_dir() {
|
||||||
[[ $? == "0" ]] && echo "$specific_dumps_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() {
|
function start_service() {
|
||||||
service="$1"
|
service="$1"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue