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
|
2023-05-26 01:07:25 -04:00
|
|
|
echo "minio executable binary not found refusing to proceed"
|
|
|
|
exit 1
|
2020-07-22 20:09:31 -04:00
|
|
|
fi
|
|
|
|
|
|
|
|
verify_sha256sum() {
|
2023-05-26 01:07:25 -04:00
|
|
|
echo "verifying binary checksum"
|
|
|
|
echo "$(awk '{print $1}' /opt/bin/minio.sha256sum) /opt/bin/minio" | sha256sum -c
|
2020-07-22 20:09:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
verify_signature() {
|
2023-05-26 01:07:25 -04:00
|
|
|
if [ "${TARGETARCH}" = "arm" ]; then
|
|
|
|
echo "ignoring verification of binary signature"
|
|
|
|
return
|
|
|
|
fi
|
|
|
|
echo "verifying binary signature"
|
|
|
|
minisign -VQm /opt/bin/minio -P RWTx5Zr1tiHQLwG9keckT0c45M3AGeHD6IvimQHpyRywVWGbP1aVSGav
|
2020-07-22 20:09:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
main() {
|
2023-05-26 01:07:25 -04:00
|
|
|
verify_sha256sum
|
2020-07-22 20:09:31 -04:00
|
|
|
|
2023-05-26 01:07:25 -04:00
|
|
|
verify_signature
|
2020-07-22 20:09:31 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
main "$@"
|