Spotter-VM/sahana-demo/srv/sahana-demo/update-ip.sh

5 lines
187 B
Bash
Executable File

#!/bin/sh
URL=$(ip route get 1 | awk '{print $NF;exit}')
sed -i "s|^settings\.base\.public_url.*|settings.base.public_url = \"https://${URL}:8498\"|" /srv/sahana-demo/conf/000_config.py