INNER CODE UNIT · Go

files

CrunchyData/crunchy-containers · cmd/pgbackrest/main.go:318

files=(/etc/pgbackrest/conf.d/**)
for i in "${!files[@]}"; do
	[[ -f "${files[$i]}" ]] || unset -v "files[$i]"
done`

	// the script run locally to get the local hash
	localScript := baseScript + `
sha1sum "${files[@]}" | sha1sum
`

	// the script to run remotely via exec
	execScript := baseScript + `
declare -r hash="$1"
local_hash="$(sha1sum "${files[@]}" | sha1sum)" 
if [[ "${local_hash}" != "${hash}" ]]; then
	printf >&2 "hash %s does not match local hash %s" "${hash}" "${local_hash}"; exit 1;
else
	` + strings.Join(cmd, " ") + `

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…