From e7b163151ddea8488f61b177655c4aa44ad12817 Mon Sep 17 00:00:00 2001 From: Giulio Date: Mon, 21 Sep 2020 01:15:04 +0200 Subject: [PATCH] Added sample update file in build --- build-tgr.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build-tgr.sh b/build-tgr.sh index eb3f7b2..fffb436 100755 --- a/build-tgr.sh +++ b/build-tgr.sh @@ -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