diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-06-13 15:49:00 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-06-13 15:49:00 -0700 |
commit | d727782c8e2e97cc3cde2d3b8836eae720108485 (patch) | |
tree | a887791987e8355c2289cb4d35f5ae7bbc1fab33 /init.d | |
parent | 2c57984234d1008988270e1ffe4bfdb79a21e14d (diff) |
webdemo hack to set IP in RT_SiteConfig.pm controlled by presence of a file instead of needing to be commented out and thus losing on upgrade
Diffstat (limited to 'init.d')
-rw-r--r-- | init.d/freeside-init | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/init.d/freeside-init b/init.d/freeside-init index 099603e..248c5b3 100644 --- a/init.d/freeside-init +++ b/init.d/freeside-init @@ -88,9 +88,11 @@ case "$1" in freeside-torrus-srvderive $QUEUED_USER echo "done." - #ip=`/sbin/ifconfig $IF | grep 'inet addr:' | cut -d: -f2- | cut -d' ' -f1` - #cp /opt/rt3/etc/RT_SiteConfig.pm.ORIG /opt/rt3/etc/RT_SiteConfig.pm - #perl -pi -e "s/localhost/$ip/" /opt/rt3/etc/RT_SiteConfig.pm + if [ -e /opt/rt3/etc/RT_SiteConfig.pm.ORIG_WEBDEMO_HACK ]; then + ip=`/sbin/ifconfig $IF | grep 'inet addr:' | cut -d: -f2- | cut -d' ' -f1` + cp /opt/rt3/etc/RT_SiteConfig.pm.ORIG_WEBDEMO_HACK /opt/rt3/etc/RT_SiteConfig.pm + perl -pi -e "s/localhost/$ip/" /opt/rt3/etc/RT_SiteConfig.pm + fi ;; stop) |