##############################################################################
# Copyright (c) Members of the EGEE Collaboration. 2004. 
# See http://www.eu-egee.org/partners/ for details on the copyright 
# holders.  
#
# Licensed under the Apache License, Version 2.0 (the "License"); 
# you may not use this file except in compliance with the License. 
# You may obtain a copy of the License at 
#
#    http://www.apache.org/licenses/LICENSE-2.0 
#
# Unless required by applicable law or agreed to in writing, software 
# distributed under the License is distributed on an "AS IS" BASIS, 
# WITHOUT WARRANTIES OR CONDITIONS 
# OF ANY KIND, either express or implied. 
# See the License for the specific language governing permissions and 
# limitations under the License.
##############################################################################
#
# NAME :        config_fix_edg-fetch-crl-cron
#
# DESCRIPTION : This function is used in 3.0 UI and WN to fix cron jobs for fetch crl.
#
# AUTHORS :     Robert.Harakaly@cern.ch
#
# NOTES :      
#
# YAIM MODULE:  glite-yaim-clients
#                 
##############################################################################

function config_fix_edg-fetch-crl-cron () {

INSTALL_ROOT=${INSTALL_ROOT:-/opt}

ex $INSTALL_ROOT/edg/etc/cron/edg-fetch-crl-cron <<EOF
%s#^\$para{EDG_LOCATION}=".*";#\$para{EDG_LOCATION}="$INSTALL_ROOT/edg";#
w
q
EOF

ex $INSTALL_ROOT/edg/etc/cron/edg-fetch-crl-cron <<EOF
%s#^\$para{X509_CERT_DIR}=".*";#\$para{X509_CERT_DIR}="$INSTALL_ROOT/etc/grid-security/certificates";#
w
q
EOF

return 0

}
