Spotter-VM/motech/srv/motech/update-ip.sh

5 lines
176 B
Bash
Raw Normal View History

#!/bin/sh
URL=$(ip route get 1 | awk '{print $NF;exit}')
sed -i "s|^server\.url.*|server.url=https://${URL}/motech|" /srv/motech/.motech/config/motech-settings.properties