add template translation on all custom templates in rtconf.d/
authorStephen Soltesz <soltesz@cs.princeton.edu>
Thu, 25 Jun 2009 04:38:41 +0000 (04:38 +0000)
committerStephen Soltesz <soltesz@cs.princeton.edu>
Thu, 25 Jun 2009 04:38:41 +0000 (04:38 +0000)
copy custom templates from local dir into rt3 configuration dirs

rt3/monitor-rt3.init

index 15c85cd..41c8143 100644 (file)
@@ -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 ] ;
@@ -84,6 +89,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
@@ -194,6 +204,7 @@ case "$1" in
                check_rt_aliases
                check_rt_init
                check_rt_sendmail
+               check_rt_custom         # todo: restart httpd if needed.
 
                result "$MESSAGE"
        ;;