torch-subscriber-docker/tor/tor.sh

11 lines
214 B
Bash
Raw Normal View History

2020-10-20 16:58:42 +00:00
#!/bin/sh
HOSTNAME=$1
IP_BROKER=$(nslookup $HOSTNAME | awk '/^Address: / { print $2 }' | tail -n1 | sed -e 's/[[:space:]]//g')
sed -i "s/$HOSTNAME/$IP_BROKER/g" /etc/tor/torrc
/usr/local/bin/svc-hostname &
tor