mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 03:21:28 +01:00
55513d40f6
Signed-off-by: Jess Frazelle <acidburn@microsoft.com>
18 lines
577 B
Bash
18 lines
577 B
Bash
#!/bin/bash
|
|
set -e
|
|
set -o pipefail
|
|
|
|
for relaytype in bridge middle exit; do
|
|
file="/etc/tor/torrc.${relaytype}"
|
|
|
|
sed -i "s/RELAY_NICKNAME/${RELAY_NICKNAME}/g" "$file"
|
|
sed -i "s/CONTACT_GPG_FINGERPRINT/${CONTACT_GPG_FINGERPRINT}/g" "$file"
|
|
sed -i "s/CONTACT_NAME/${CONTACT_NAME}/g" "$file"
|
|
sed -i "s/CONTACT_EMAIL/${CONTACT_EMAIL}/g" "$file"
|
|
sed -i "s/RELAY_BANDWIDTH_RATE/${RELAY_BANDWIDTH_RATE}/g" "$file"
|
|
sed -i "s/RELAY_BANDWIDTH_BURST/${RELAY_BANDWIDTH_BURST}/g" "$file"
|
|
sed -i "s/RELAY_PORT/${RELAY_PORT}/g" "$file"
|
|
done
|
|
|
|
exec tor -f "/etc/tor/torrc.${RELAY_TYPE}"
|