2018-06-06 23:06:54 +02:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
set -o pipefail
|
2018-06-06 23:04:18 +02:00
|
|
|
|
|
|
|
for relaytype in bridge middle exit; do
|
2018-06-06 23:06:54 +02:00
|
|
|
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"
|
2018-06-17 19:23:31 +02:00
|
|
|
sed -i 's/${RELAY_PORT}/'"$RELAY_PORT"'/g' "/etc/tor/torrc.$relaytype"
|
2018-06-06 23:04:18 +02:00
|
|
|
done
|
|
|
|
|
2018-09-25 00:36:11 +02:00
|
|
|
exec tor -f "/etc/tor/torrc.${RELAY_TYPE}"
|