X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=rt3%2Fmonitor-rt3.init;h=0e24a11ff2bf53022ad5f4933f84afe588837489;hb=4b97eb6c50faeeaa40660b73cd70c17cc572a2c9;hp=ca94353907ef74be7762cfb93ce6b849ccea7790;hpb=6a640c65a59921a7f96d9507e317b7e8c0389085;p=monitor.git diff --git a/rt3/monitor-rt3.init b/rt3/monitor-rt3.init index ca94353..0e24a11 100644 --- a/rt3/monitor-rt3.init +++ b/rt3/monitor-rt3.init @@ -54,6 +54,11 @@ function check_rt_siteconfig () { tmp_siteconfig=$(mktemp) tmp_initialdata=$(mktemp) + + # TODO: need a better approach for this. + for f in $MONITORPATH/rt3/rtconf.d/*.pl ; do + update_config PLC_RT_HOSTNAME $PLC_RT_HOST $f + done # if the templates are newer than the actual config, then replace them. if [ $MONITORPATH/rt3/RT_SiteConfig.pm -nt /etc/rt3/RT_SiteConfig.pm ] ; @@ -65,6 +70,7 @@ function check_rt_siteconfig () # setup RT_SiteConfig.pm update_config PLC_NAME "$PLC_NAME" $tmp_siteconfig update_config PLC_RT_HOSTNAME $PLC_RT_HOST $tmp_siteconfig + update_config PLC_WWW_HOSTNAME $PLC_WWW_HOST $tmp_siteconfig update_config RT_DB_NAME $RT3_DB_NAME $tmp_siteconfig update_config RT_DB_USER $RT3_DB_USER $tmp_siteconfig @@ -84,6 +90,11 @@ function check_rt_siteconfig () fi } +function check_rt_custom () +{ + rsync -qv -az $MONITORPATH/rt3/local/html /usr/share/rt3 +} + function check_rt_pghba () { NAME=$RT3_DB_NAME @@ -122,24 +133,18 @@ function check_rt_init () { if [ ! -f /etc/rt3/setup.finished ] ; then /usr/sbin/rt-setup-database --action init --dba postgres - for f in $MONITORPATH/rt3/rtinit.d/*.pl ; do + for f in $MONITORPATH/rt3/rtconf.d/*.pl ; do /usr/sbin/rt-setup-database --action insert --dba postgres --datafile $f done - touch /etc/rt3/setup.finished - ###Last DB adjustments - #setup custom field values - cat <