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

5 lines
148 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}:8403|" /srv/ckan/conf/ckan.ini