|
|
|
|
@ -64,9 +64,9 @@ EOM
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# UPDATE SOPS CONFIG
|
|
|
|
|
pushd "${keyfiles_dir}"
|
|
|
|
|
pushd "${keyfiles_dir}" > /dev/null 2>&1
|
|
|
|
|
(fn_update_sops_config) > "${sops_config}"
|
|
|
|
|
popd
|
|
|
|
|
popd > /dev/null 2>&1
|
|
|
|
|
|
|
|
|
|
# VERIFY
|
|
|
|
|
fn_verify_sops_config(){
|
|
|
|
|
@ -82,8 +82,9 @@ fn_verify_sops_config(){
|
|
|
|
|
GPG_TTY=$(tty) sops -d "${sops_enc_file}"
|
|
|
|
|
}
|
|
|
|
|
if [[ "${secrets_file}" != "0" ]]; then
|
|
|
|
|
pushd "${sops_config_dir}"
|
|
|
|
|
pushd "${sops_config_dir}" > /dev/null 2>&1
|
|
|
|
|
fn_verify_sops_config "${secrets_file}"
|
|
|
|
|
popd > /dev/null 2>&1
|
|
|
|
|
|
|
|
|
|
echo "# SUCESS: all users with keys in this dir should have functional keys"
|
|
|
|
|
else
|
|
|
|
|
|