Originally posted by Michael Stankov
#!/usr/bin/ksh# the purpose of this script is to set the environs variable in the server.ini file# so that it has all our Cloverleaf sites in sorted order# History:## 2005.08.17 Russ Ross wrote initial version#cp -p $HCIROOT/server/server.ini $HCIROOT/server/server.ini_`date +"%Y.%m.%d_%H:%M:%S"`perl -pi -e "s,^environs=.*$,`mk_server_ini_environs.ksh`," $HCIROOT/server/server.ini
#!/usr/bin/ksh# the purpose of this script is to create the statement to initialize the environs variable# which can be redirected to a temp file like x.x and then manually inserted # into the server.ini file so the Cloverleaf sites will appear in sorted order in the GUI# History:## 2005.06.21 Russ Ross wrote initial versionenvorns_statement="environs="for site in `list_sites.ksh`; do envorns_statement="$envorns_statement$HCIROOT/$site;"doneecho "$envorns_statement" | perl -pi -e "s/;$//"
#!/usr/bin/ksh# Begin Module Header ==============================================================================##------# Name:#------## list_sites.ksh##---------# Purpose:#---------## List all the sites for the current $HCIROOT##--------# Inputs:#--------## none##-------# Notes:#-------## This script assumes the proper environment is set when it is called# and all sites are symbolic links at the $HCIROOT level##---------# History:#---------## 2001.02.22 Russ Ross# - wrote initial version.## 2001.07.25 Russ Ross# - modified to look for $HCIROOT/*/siteInfo files to determine the list of sites,# previously had looked for symbolic links in the $HCIROOT directory which only# works if everyone follows MDACC conventions## 2003.11.17 Russ Ross# - modified to execlude siteProto from the list of sites## End of Module Header =============================================================================#-----------------------------------------------------------------------------------------# get a list of all the sites for the current $HCIROOT# (Note: there is an assumption that all sites are a symbolic link at the $HCIROOT level)#-----------------------------------------------------------------------------------------(cd $HCIROOT; ls ./*/siteInfo 2>/dev/null) | awk -F/ '{print $2}' | grep -v siteProto | sort