create modular prolog and epilog setup

all files named  [0-9][0-9]* in /opt/SGE/local/scripts/{prolog,epilog,pe_prolog,pe_epilog}.d and in /usr/local/etc/gridengine/{prolog,epilog,pe_prolog,pe_epilog}.d will be executed.
This commit is contained in:
Kasper D. Fischer 2021-05-25 11:33:08 +02:00
parent a5963b445b
commit 02913e042d
8 changed files with 24 additions and 0 deletions

1
bin/epilog Symbolic link
View File

@ -0,0 +1 @@
pro-epilog_wrapper.sh

1
bin/pe_epilog Symbolic link
View File

@ -0,0 +1 @@
pro-epilog_wrapper.sh

1
bin/pe_prolog Symbolic link
View File

@ -0,0 +1 @@
pro-epilog_wrapper.sh

20
bin/pro-epilog_wrapper.sh Executable file
View File

@ -0,0 +1,20 @@
#!/bin/bash
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin
FILES=""
SCRIPTNAME=$(basename $0)
DIRS="/opt/SGE/local/scripts/${SCRIPTNAME}.d /usr/local/etc/gridengine/${SCRIPTNAME}.d"
for DIR in ${DIRS} ; do
if [ -d ${DIR} ] ; then
if [ ! -z $(ls ${DIR}/[0-9][0-9]*) ] ; then
FILES="${FILES} $(ls ${DIR}/[0-9][0-9]*)"
fi
fi
done
FILESSORTED="$(echo ${FILES} | sort)"
for FILE in ${FILESSORTED} ; do
echo ${FILE} || exit $?
done
exit 0

1
bin/prolog Symbolic link
View File

@ -0,0 +1 @@
pro-epilog_wrapper.sh

0
pe_epilog.d/.gitkeep Normal file
View File

0
pe_prolog.d/.gitkeep Normal file
View File

0
prolog.d/.gitkeep Normal file
View File