#!/bin/sh

##########################################################################
#   Script description:
#       Install script for Condor scheduler
#
#   Arguments:
#       $1 = port name
#       $2 = mode (e.g. 'POST-INSTALL')
#
#   Returns:
#       Standard
#
#   History:
#   Date        Name        Modification
#   2011-11-22  J Bacon     Derived from Ganglia pkg-install
##########################################################################

u=condor
g=condor

# Place condor on a large partition so it can accommodate output files from
# jobs.  The default /var/db/condor could result in /var filling up with
# job output.
# Note that /home may be linked to a shared partition on a cluster built
# with sysutils/cluster-admin, which could cause collisions between
# condor daemons on compute nodes sharing this space.  In this case,
# override by setting LOCAL_DIR in your condor_config file.
LOCAL_DIR=/home/condor

case $2 in
PRE-INSTALL)
    ;;
POST-INSTALL)
    for dir in log spool config execute; do
	mkdir -p $LOCAL_DIR/$dir
    done
    chown -Rh $u:$g $LOCAL_DIR
    ;;
esac
