#!/bin/sh
set -e

conf_path='/etc/apache2/mods-available/rpaf.conf'
main_ip=$(ip addr show scope global up | awk -F '[ /]' '/inet/ {print $6}' | xargs)

sed -i -e "s/^\(RPAF_ProxyIPs.*\)$/\1 $main_ip/" $conf_path
