Updates to linux CAVE start up to remove access print statements and default locations

This commit is contained in:
ucar-tmeyer 2023-01-31 18:41:04 +00:00
parent 89050d575d
commit d19b106c12
3 changed files with 5 additions and 27 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

View file

@ -110,28 +110,7 @@ if [ $? -ne 0 ]; then
fi
SWITCHES=($SWITCHES)
TESTCHECK="$TMCP_HOME/bin/getTestMode"
if [ -x ${TESTCHECK} ]; then
echo "Calling getTestMode()"
${TESTCHECK}
status=${?}
if [ $status -eq 11 ]; then
MODE="TEST"
SWITCHES+=(-mode TEST)
elif [ $status -eq 12 ];then
MODE="PRACTICE"
SWITCHES+=(-mode PRACTICE)
elif [ $status -eq 15 ];then
MODE="OPERATIONAL"
SWITCHES+=(-mode OPERATIONAL)
else
MODE="OPERATIONAL (no response)"
fi
echo "getTestMode() returned ${MODE}"
else
MODE="UNKNOWN"
echo "getTestMode() not found - going to use defaults"
fi
MODE="PRACTICE"
VERSION_ARGS=()
if [ -f ${CAVE_INSTALL}/awipsVersion.txt ]; then

View file

@ -47,6 +47,7 @@
# simultaneous purges. Allow override of days to keep.
# Jan 26, 2017 #6092 randerso return exitCode so it can be propagated back to through the calling processes
# Oct 22, 2019 #7943 tjensen Remove -x flag from grep check in deleteOldEclipseConfigurationDirs()
# Jan 31, 2022 tiffanym@ucar.edu Clean up output when CAVE is started
########################
source /awips2/cave/iniLookup.sh
@ -418,9 +419,7 @@ function deleteOldCaveLogs()
# Purge the old logs.
local n_days_to_keep=${CAVE_LOG_DAYS_TO_KEEP:-30}
echo -e "Cleaning consoleLogs: "
echo -e "find $logdir -type f -name "*.log" -mtime +$n_days_to_keep | xargs rm "
find "$logdir" -type f -name "*.log" -mtime +"$n_days_to_keep" | xargs rm
find "$logdir" -type f -name "*.log" -mtime +"$n_days_to_keep" | xargs -r rm
# Record the last purge time and remove the lock file.
echo $(date +%s) > "$last_purge_f"
@ -474,7 +473,7 @@ function deleteEclipseConfigurationDir()
function createEclipseConfigurationDir()
{
local d dir id=$(hostname)-$(whoami)
for d in "/local/cave-eclipse/" "$HOME/.cave-eclipse/"; do
for d in "$HOME/.cave-eclipse/"; do
if [[ $d == $HOME/* ]]; then
mkdir -p "$d" || continue
fi
@ -487,7 +486,7 @@ function createEclipseConfigurationDir()
fi
done
echo "Unable to create a unique Eclipse configuration directory. Will proceed with default." >&2
export eclipseConfigurationDir=$HOME/.cave-eclipse
export eclipseConfigurationDir=$HOME/caveData/.cave-eclipse
return 1
}