2020-07-22 20:09:31 -04:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
2021-09-10 01:19:11 -04:00
|
|
|
if [ ! -x "/opt/bin/minio" ]; then
|
2020-07-22 20:09:31 -04:00
|
|
|
echo "minio executable binary not found refusing to proceed"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
verify_sha256sum() {
|
|
|
|
echo "verifying binary checksum"
|
2021-09-10 01:19:11 -04:00
|
|
|
echo "$(awk '{print $1}' /opt/bin/minio.sha256sum) /opt/bin/minio" | sha256sum -c
|
2020-07-22 20:09:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
verify_signature() {
|
2020-11-26 12:47:30 -05:00
|
|
|
if [ "${TARGETARCH}" = "arm" ]; then
|
|
|
|
echo "ignoring verification of binary signature"
|
|
|
|
return
|
|
|
|
fi
|
2020-07-22 20:09:31 -04:00
|
|
|
echo "verifying binary signature"
|
2021-09-10 01:19:11 -04:00
|
|
|
minisign -VQm /opt/bin/minio -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav
|
2020-07-22 20:09:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
main() {
|
|
|
|
verify_sha256sum
|
|
|
|
|
|
|
|
verify_signature
|
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|