15 lines
217 B
Bash
15 lines
217 B
Bash
#!/bin/bash
|
|
|
|
FILENAME=$1
|
|
|
|
ARCHIVE=$(/opt/archive/get_file "$FILENAME" | sha256sum)
|
|
ORIGINAL=$(cat "$FILENAME" | sha256sum)
|
|
|
|
if [[ "$ARCHIVE" == "$ORIGINAL" ]]
|
|
then
|
|
echo "OK"
|
|
exit 0
|
|
else
|
|
echo "ERROR"
|
|
exit 1
|
|
fi
|