2021-02-13 21:33:12 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -x
|
|
|
|
set -e
|
|
|
|
|
|
|
|
LOCAL_IP_ADDR=$(hostname -I | head -n 1 | cut -d' ' -f1)
|
2021-03-28 02:39:14 +00:00
|
|
|
SPHINX_TOR_ADDR=$(cat /var/lib/tor/mynode_sphinx/hostname)
|
2021-02-13 21:33:12 +00:00
|
|
|
|
|
|
|
# Update IP address in config file (local IP)
|
|
|
|
if [ -f /mnt/hdd/mynode/sphinxrelay/app.json ]; then
|
2021-03-28 02:39:14 +00:00
|
|
|
sed -i "s/public_url\": \".*/public_url\": \"${SPHINX_TOR_ADDR}:53001\",/g" /mnt/hdd/mynode/sphinxrelay/app.json
|
2021-02-13 21:33:12 +00:00
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|