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