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

5 lines
143 B
Bash
Executable File

#!/bin/sh
URL=$(ip route get 1 | awk '{print $NF;exit}')
sed -i "s|^ckan\.site_url.*|ckan.site_url = https://${URL}:8003|" /etc/ckan/ckan.ini