mynode/rootfs/standard/usr/bin/mynode_pre_sphinxrelay.sh
2021-03-27 21:39:14 -05:00

14 lines
371 B
Bash
Executable File

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