script:/var/cfengine/input/cf.unicore-roles

From Dgiref
Jump to: navigation, search
#########################################################
#
# Karlsruher Institut fuer Technologie (KIT)
# Steinbuch Centre for Computing (SCC)
# D-Grid Refernzinstallation
#
# Name:         cf.unicore-uudb
# Created by:   Foued Jrad
# Created:      19.01.2009
#
# BEGIN cf.unicore-uudb
#
#########################################################

control:

   unicore_uudb  = ( /etc/grid-security/UUDB.in )
   unicore_uudb_njs =  ( /opt/unicore/uudb/UUDB.in )
   update_uudb  = ( /etc/grid/etc/updateUUDB.sh )
   update_uudb_bin = ( /usr/bin/updateUUDB.sh )

copy:

   unicore::
      ${update_uudb} dest=${update_uudb_bin}
        r=inf
        backup=false
        server=${policyhost}
        timestamps=preserve
        mode=755
        type=checksum
        define=new_update_uudb

   unicore::
      ${unicore_uudb} dest=${unicore_uudb_njs}
        r=inf
        backup=false
        server=${policyhost}
        timestamps=preserve
        type=checksum
        define=new_uudb,run_update_uudb

shellcommands:

   run_update_uudb::
      "/bin/sh /usr/bin/updateUUDB.sh"
       owner=0
       group=0
       background=true
       inform=true
       define=new_run_update_uudb
       elsedefine=new_not_run_update_uudb

alerts:

   new_update_uudb::
      SysLog(LOG_ERR, "cfengine: a new updateUUDB.sh script was copied to ${update_uudb_bin}")
   new_uudb::
      SysLog(LOG_ERR, "cfengine: a new UUDB.in was copied to ${unicore_uudb_njs}")

   new_run_update_uudb::
      SysLog(LOG_ERR, "cfengine: /usr/bin/updateUUDB.sh was executed")
   new_not_run_update_uudb::
      SysLog(LOG_ERR, "cfengine: /usr/bin/updateUUDB.sh cannot be executed")

#########################################################
#
# END cf.unicore-uudb
#
#########################################################

Personal tools