From 9b53e5c2ac7ce0b9fa173ce96256596e7337eaf3 Mon Sep 17 00:00:00 2001 From: Benjamin Dweck Date: Wed, 7 Oct 2020 13:13:12 +0200 Subject: [PATCH] Take GPG key lookup via email for signing into account --- README.md | 15 ++++++++++++--- make-pkg.sh | 12 +++++++++++- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index cbd3b26..6e8f0c4 100644 --- a/README.md +++ b/README.md @@ -15,14 +15,23 @@ A TORch solution consists of 3 processes: ## Build Debian Package -Run `make-pkg.sh` to build a Debian package and install it +If you don't already have a GPG key, generate one: ```bash -./make-pkg.sh +gpg --full-generate-key +``` + +Using the e-mail address you provided during GPG key generation, run `make-pkg.sh` to build a Debian package and install it + +```bash +./make-pkg.sh john@doe.com apt update && apt install build/torch-agent_0.0.1-1_all.deb ``` -This will create a local user `torch` and install the TORch agent as a Systemd service named `torch-agent` +This will: +* create a local user `torch` +* install the TORch agent as a Systemd service named `torch-agent` +* modify `/etc/tor/torrc` to activate control via the Tor Controller port ## Configuration diff --git a/make-pkg.sh b/make-pkg.sh index d02b254..6026f7a 100755 --- a/make-pkg.sh +++ b/make-pkg.sh @@ -1,6 +1,16 @@ #!/bin/bash -TORCH_VERSION=0.0.1 +if [[ -z "${DEBEMAIL}" ]]; then + DEBEMAIL="$1" +fi + +if [[ -z "${DEBEMAIL}" ]]; then + echo "E-mail address required for packaging signing with gpg key!" + echo "Usage: ./make-pkg.sh EMAIL" + exit 1 +fi + +TORCH_VERSION=$(git describe --tags) DEBIAN_PKG=torch-agent-$TORCH_VERSION PKG_ROOT=build/$DEBIAN_PKG