torch-subscriber-docker/tor/tor.sh

11 lines
214 B
Bash
Executable File

#!/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