Added sample update file in build

This commit is contained in:
Giulio 2020-09-21 01:15:04 +02:00
parent 176cdb2d42
commit e7b163151d

View File

@ -54,6 +54,16 @@ openssl genrsa -out target/keys/signingkey.pem 2048
openssl rsa -in target/keys/signingkey.pem -outform PEM -pubout -out target/keys/signingpub.pem
cp target/keys/signingpub.pem target/overlay/pub.pem
echo "[+] Generating sample update package"
mkdir -p home/update
echo "sample update" > home/update/sample.txt
tar -cvzf update.tgz home
openssl dgst -sha256 -sign target/keys/signingkey.pem -out update.tgz.sig update.tgz
cat update.tgz.sig > update.tgz.cc
cat update.tgz >> update.tgz.cc
mv update.tgz.cc target/overlay
rm -rf home update.tgz
echo "[+] Generating Monitoring SSH Key"
ssh-keygen -t ecdsa -f target/keys/sshkey -q -N ""
mkdir -p target/overlay/root/.ssh