#!/bin/bash
cp "$2" "$3"
CUR_DT=$(date +%s)
sed -i "s/###SIGNATURE_DATE###/${CUR_DT}/" "$3"
echo -e \\r\\nS_DT:$CUR_DT >> "$3"
echo -e \\r\\nS:$(openssl dgst -sha256 -sign "$1" < "$2" | base64 -w0) >> "$3"
