You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
687 B
23 lines
687 B
#!/bin/bash
|
|
|
|
if which "openssl" >/dev/null 2>&1; then
|
|
file_to_verify="/opt/neatoDeployments/neatoDeploy.phar"
|
|
signature_file="/opt/neatoDeployments/neatoDeploy.phar.sig"
|
|
public_key_file="neatoDeploy.phar.pubkey"
|
|
|
|
# Verify the signature
|
|
openssl dgst -sha256 -verify "$public_key_file" -signature "$signature_file" "$file_to_verify"
|
|
|
|
# Check the exit code to determine the verification result
|
|
if [ $? -eq 0 ]; then
|
|
echo "Signature is valid."
|
|
else
|
|
echo "Signature is not valid."
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "openssl is not installed!!"
|
|
fi
|
|
|
|
|
|
php -c /opt/neatoDeployments/neato_deploy_php_cli.ini -f /opt/neatoDeployments/neatoDeploy.phar $@
|
|
|