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-09-25 00:42:35 +02:00
|
|
|
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"
|
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}"
|