From efd9d2557e385bd8b0e2901e7488953dfba30af9 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Wed, 6 Jun 2018 17:06:54 -0400 Subject: [PATCH] cleanup Signed-off-by: Jess Frazelle --- tor-relay/Dockerfile | 1 + tor-relay/run.sh | 18 ++++++++++-------- vscode/Dockerfile | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/tor-relay/Dockerfile b/tor-relay/Dockerfile index a7fa3e8..a28125b 100644 --- a/tor-relay/Dockerfile +++ b/tor-relay/Dockerfile @@ -20,6 +20,7 @@ FROM alpine:latest LABEL maintainer "Jessie Frazelle " RUN apk --no-cache add \ + bash \ tor # default port to used for incoming Tor connections diff --git a/tor-relay/run.sh b/tor-relay/run.sh index 40c98f6..f0b8efb 100644 --- a/tor-relay/run.sh +++ b/tor-relay/run.sh @@ -1,12 +1,14 @@ -#!/bin/sh +#!/bin/bash +set -e +set -o pipefail for relaytype in bridge middle exit; do - sed -i 's/${RELAY_NICKNAME}/'"$RELAY_NICKNAME"'/g' "/etc/tor/torrc.$relaytype" - sed -i 's/${CONTACT_GPG_FINGERPRINT}/'"$CONTACT_GPG_FINGERPRINT"'/g' "/etc/tor/torrc.$relaytype" - sed -i 's/${CONTACT_NAME}/'"$CONTACT_NAME"'/g' "/etc/tor/torrc.$relaytype" - sed -i 's/${CONTACT_EMAIL}/'"$CONTACT_EMAIL"'/g' "/etc/tor/torrc.$relaytype" - sed -i 's/${RELAY_BANDWIDTH_RATE}/'"$RELAY_BANDWIDTH_RATE"'/g' "/etc/tor/torrc.$relaytype" - sed -i 's/${RELAY_BANDWIDTH_BURST}/'"$RELAY_BANDWIDTH_BURST"'/g' "/etc/tor/torrc.$relaytype" + sed -i 's/${RELAY_NICKNAME}/'"$RELAY_NICKNAME"'/g' "/etc/tor/torrc.$relaytype" + sed -i 's/${CONTACT_GPG_FINGERPRINT}/'"$CONTACT_GPG_FINGERPRINT"'/g' "/etc/tor/torrc.$relaytype" + sed -i 's/${CONTACT_NAME}/'"$CONTACT_NAME"'/g' "/etc/tor/torrc.$relaytype" + sed -i 's/${CONTACT_EMAIL}/'"$CONTACT_EMAIL"'/g' "/etc/tor/torrc.$relaytype" + sed -i 's/${RELAY_BANDWIDTH_RATE}/'"$RELAY_BANDWIDTH_RATE"'/g' "/etc/tor/torrc.$relaytype" + sed -i 's/${RELAY_BANDWIDTH_BURST}/'"$RELAY_BANDWIDTH_BURST"'/g' "/etc/tor/torrc.$relaytype" done -tor -f /etc/tor/torrc.${RELAY_TYPE} +exec tor -f /etc/tor/torrc.${RELAY_TYPE} diff --git a/vscode/Dockerfile b/vscode/Dockerfile index 99e5a5a..b4d1325 100644 --- a/vscode/Dockerfile +++ b/vscode/Dockerfile @@ -49,7 +49,7 @@ RUN apt-get update && apt-get -y install \ libxrender1 \ libxss1 \ libxtst6 \ - openssh-client \ + openssh-client \ --no-install-recommends \ && rm -rf /var/lib/apt/lists/*