[Isocops] Cron <ibexops at ena> sh -x -v $IBEX_CRON/cronswitch.sh rsync-raw-web < /dev/null >/dev/null

Cron Daemon root at ena.sr.unh.edu
Fri Feb 2 08:25:01 EST 2018


#!/bin/sh
#
Id=cronswitch.sh Xx=
+ Id=cronswitch.sh
+ Xx=
VERSION="$Id: cronswitch.sh 8718 2011-10-29 21:50:02Z ibexops $Xx"
+ VERSION='cronswitch.sh: cronswitch.sh 8718 2011-10-29 21:50:02Z ibexops '
#
# Big switch for crontab execution
#

ME=`basename $0`
basename $0
++ basename /home/ibexops/IBEX/sw/isoc/src/ops/admin/cronswitch.sh
+ ME=cronswitch.sh
[ -z "$IBEX_HOME" ] && {
	echo $ME: IBEX_HOME is expected by this script. 1>&2
	exit 1
}
+ '[' -z /home/ibexops/IBEX ']'
[ -z "$IBEX_ARCH" ] && {
	echo $ME: IBEX_ARCH is expected by this script. 1>&2
	exit 1
}
+ '[' -z i686-5.e ']'
[ -z "$IBEX_CRON" ] && {
	echo $ME: IBEX_CRON is expected by this script. 1>&2
	exit 2
}
+ '[' -z /home/ibexops/IBEX/sw/isoc/src/ops/admin ']'
[ $# -lt 1 ] && {
	echo $ME: At least one switch argument is required. 1>&2
	exit 3
}
+ '[' 1 -lt 1 ']'
[ "$1" = "--help" ] && {
	echo Usage: $ME task ...
	exit 0
}
+ '[' rsync-raw-web = --help ']'
[ "$1" = "--version" ] && {
	echo $VERSION
	exit 0
}
+ '[' rsync-raw-web = --version ']'

#
# It is sometimes necessary to pass through development software
#
[ -z "$IBEX_ROOT" ] && IBEX_ROOT=$IBEX_HOME/sw
+ '[' -z '' ']'
+ IBEX_ROOT=/home/ibexops/IBEX/sw
export IBEX_ROOT
+ export IBEX_ROOT

[ "$IBEX_ROOT" = "$IBEX_HOME/sw" ] ||
	echo "Warning: IBEX_ROOT is not IBEX_HOME/sw" 1>&2
+ '[' /home/ibexops/IBEX/sw = /home/ibexops/IBEX/sw ']'

#
# suck in an environment and start up in a safe place
# might as well be quiet here.
#
[ -f $IBEX_ROOT/$IBEX_ARCH/bin/isoc.sh ] &&
   e=$IBEX_ROOT/$IBEX_ARCH/bin/isoc.sh || {
	echo $IBEX_ROOT/$IBEX_ARCH/bin/isoc.sh does not exist.
	[ -f $IBEX_ROOT/tools/isoc.sh ] &&
	   e=$IBEX_ROOT/tools/isoc.sh || {
		echo $IBEX_ROOT/tools/isoc.sh missing too....
		exit 3
	}
}
+ '[' -f /home/ibexops/IBEX/sw/i686-5.e/bin/isoc.sh ']'
+ e=/home/ibexops/IBEX/sw/i686-5.e/bin/isoc.sh
echo ''
+ echo ''
export IBEX_QUIET=true
+ export IBEX_QUIET=true
+ IBEX_QUIET=true
echo $ME is using $e for setup
+ echo cronswitch.sh is using /home/ibexops/IBEX/sw/i686-5.e/bin/isoc.sh for setup
. $e
+ . /home/ibexops/IBEX/sw/i686-5.e/bin/isoc.sh
#!/bin/sh
#
# (Ba)sh startup for ISOC work
#
# $Id: isoc.sh.in 6050 2010-01-03 21:37:07Z gbc $
#
# Version 5.e
#

#
# Help for the befuddled user.  The name is probably isoc.sh.
#
zero=$0
++ zero=/home/ibexops/IBEX/sw/isoc/src/ops/admin/cronswitch.sh
[ "$zero" = -bash -o pc = apple ] && zero=isoc.sh
++ '[' /home/ibexops/IBEX/sw/isoc/src/ops/admin/cronswitch.sh = -bash -o pc = apple ']'
Me=`basename $zero`
basename $zero
+++ basename /home/ibexops/IBEX/sw/isoc/src/ops/admin/cronswitch.sh
++ Me=cronswitch.sh
Help="Usage: . $Me

to set up your IBEX environment.  This includes the creation
and/or modifications to the following environment variables:

	IBEX_*
	PATH MANPATH INFOPATH CLASSPATH
	PERL5LIB IDL_PATH PYTHONPATH

NOTE: PATH variables are not adjusted if the IBEX_SETUP variable
is something other than an empty string.  Generally speaking, many
of the IBEX_* variables may be reset to point somewhere else after
this script has set up defaults for them.  Resetting IBEX_HOME
to point somewhere else, and re-sourcing this script re-sets them
all to point to subdirs of IBEX_HOME.
"
++ Help='Usage: . cronswitch.sh

to set up your IBEX environment.  This includes the creation
and/or modifications to the following environment variables:

	IBEX_*
	PATH MANPATH INFOPATH CLASSPATH
	PERL5LIB IDL_PATH PYTHONPATH

NOTE: PATH variables are not adjusted if the IBEX_SETUP variable
is something other than an empty string.  Generally speaking, many
of the IBEX_* variables may be reset to point somewhere else after
this script has set up defaults for them.  Resetting IBEX_HOME
to point somewhere else, and re-sourcing this script re-sets them
all to point to subdirs of IBEX_HOME.
'
Version="/home/ibexops/IBEX/sw/isoc/src/$Me	[ Jan 07 02:35:40 UTC 2018 ]"
++ Version='/home/ibexops/IBEX/sw/isoc/src/cronswitch.sh	[ Jan 07 02:35:40 UTC 2018 ]'
case "nada$1" in
nada--help)	echo "$Help"    ; exit 0 ;;
nada--version)	echo "$Version" ; exit 0 ;;
nada)	;;
esac
++ case "nada$1" in
unset Velp Version
++ unset Velp Version

[ -z "$IBEX_SETUP" ] && {
#
# head: wrap the whole thing based on IBEX_SETUP
#

#
# force cooperative policy
#
umask 007

#
# basic environment variables
#
IBEX_ROOT=/home/ibexops/IBEX/sw
IBEX_ARCH=i686-5.e
export IBEX_ROOT IBEX_ARCH

#
# C_INCLUDE_PATH and LIBRARY_PATH should not be needed.
# but LIBRARY_PATH, C_INCLUDE_PATH, STABLE_LIB, STABLE_INCLUDE
# are configured.
#

#
# SPICE
#
[ -z "" ] && {
	IBEX_SPICE=/home/ibexops/IBEX/sw/i686-5.e/share/isoc/spice
	SPICE_BIN=/home/ibexops/IBEX/sw/tools/cspice-N0064/exe
	spicepath=/home/ibexops/IBEX/sw/tools/cspice-N0064/exe
} || {
	SPICE_BIN=
	spicepath=
}
export IBEX_SPICE SPICE_BIN

#
# JAVA Path
#
[ -z "#" -a -d "/usr/bin" ] &&
	javapath="/usr/bin" || javapath=

#
# PATH -- isoc tools come first to allow overrides
#
path=${IBEX_ROOT}/${IBEX_ARCH}/bin
tool_path=$IBEX_ROOT/tools/$IBEX_ARCH/bin
[ -d $tool_path ] && path=${path}:${tool_path}
[ -d "$spicepath" ] && path=${path}:${spicepath}
[ -n "$javapath" ] && path=${path}:${javapath}
[ -z "$PATH" ] &&
       PATH=${path} ||
       PATH=${path}:$PATH
export PATH ; unset path tool_path spicepath javapath

#
# MANPATH
#
for d in ${IBEX_ROOT}/${IBEX_ARCH}/man \
	 ${IBEX_ROOT}/${IBEX_ARCH}/share/man \
	 $IBEX_ROOT/tools/$IBEX_ARCH/man \
	 $IBEX_ROOT/tools/$IBEX_ARCH/share/man
    do [ -d $d ] &&
	{ [ -n "$manpath" ] && manpath=${manpath}:$d || manpath=$d; }
    done
[ -f /etc/man.config -a -z "$MANPATH" ] &&
       MANPATH=`grep ^MANPATH'[^_]' /etc/man.config | cut -f2 |\
		tr \\\\012 : | sed 's@:$@@'`
[ -n "$manpath" ] &&
    [ -z "$MANPATH" ] &&
       MANPATH=${manpath} ||
       MANPATH=${manpath}:$MANPATH
export MANPATH ; unset manpath mantools

#
# INFOPATH
#
for d in ${IBEX_ROOT}/${IBEX_ARCH}/info \
	 ${IBEX_ROOT}/${IBEX_ARCH}/share/info \
	 $IBEX_ROOT/tools/$IBEX_ARCH/info \
	 $IBEX_ROOT/tools/$IBEX_ARCH/share/info
    do [ -d $d ] &&
	{ [ -n "$infopath" ] && infopath=${infopath}:$d || infopath=$d; }
    done
[ -n "$infopath" ] &&
    [ -z "$INFOPATH" ] &&
       INFOPATH=${infopath} ||
       INFOPATH=${infopath}:$INFOPATH
export INFOPATH ; unset infopath

#
# PERL
#
# Things preloaded in @INC; Cf. use lib "/this"; use lib "/that";
#
perlpath=${IBEX_ROOT}/${IBEX_ARCH}/lib/perl5/site_perl
perltools=${IBEX_ROOT}/tools/${IBEX_ARCH}/lib/perl5/site_perl
[ -d $perltools ] && perlpath=${perlpath}:${perltools}
[ -z "$PERL5LIB" ] &&
       PERL5LIB=${perlpath} ||
       PERL5LIB=${perlpath}:$PERL5LIB
export PERL5LIB ; unset perlpath perltools

#
# IDL
#
# If IDL_PATH is defined, <IDL_DEFAULT> is needed for system libraries
# $idl_fixme is transitional--it should go away.
#
idl_path=${IBEX_ROOT}/${IBEX_ARCH}/share/isoc/idl
idl_tools=${IBEX_ROOT}/tools/${IBEX_ARCH}/share/idl
[ -d $idl_tools ] && idl_path=${idl_path}:${idl_tools}
idl_fixme=${IBEX_ROOT}/${IBEX_ARCH}/share/idl
[ -d $idl_fixme ] && idl_path=${idl_path}:${idl_fixme}
[ -z "$IDL_PATH" ] &&
       IDL_PATH=${idl_path}:'<IDL_DEFAULT>' ||
       IDL_PATH=${idl_path}:$IDL_PATH
export IDL_PATH ; unset idl_path idl_tools

#
# GNUPLOT
#
type -t gdfontpath.sh >/dev/null && eval `gdfontpath.sh`

#
# PYTHON
#
pythonpath=${IBEX_ROOT}/${IBEX_ARCH}/python
pythontools=$IBEX_ROOT/tools/$IBEX_ARCH/python
[ -d $pythontools ] && pythonpath=${pythonpath}:${pythontools}
[ -z "$PYTHONPATH" ] &&
       PYTHONPATH=${pythonpath} ||
       PYTHONPATH=${pythonpath}:$PYTHONPATH
export PYTHONPATH ; unset pythonpath

#
# JAVA Classpath
#
[ -z "#" ] && {
	classpath=${IBEX_ROOT}/${IBEX_ARCH}/share/java
	toolspath=${IBEX_ROOT}/tools/${IBEX_ARCH}/share/java
	[ -d $toolspath ] && classpath=${classpath}:${toolspath}
	[ -z "$CLASSPATH" ] &&
	       CLASSPATH=${classpath} ||
	       CLASSPATH=${classpath}:$CLASSPATH
	export CLASSPATH
	unset classpath toolspath
}

#
# all done
#
[ -z "$IBEX_QUIET" ] &&
	echo Setup ISOC version 5.e with IBEX_ROOT=$IBEX_ROOT
IBEX_SETUP=true
export IBEX_SETUP

#
# tail: wrap the whole thing based on IBEX_SETUP
#
} || {
#
# just tell the human what was previously set up
#
[ -z "$IBEX_QUIET" ] &&
	echo Using ISOC version 5.e with IBEX_ROOT=$IBEX_ROOT
}
++ '[' -z '' ']'
++ umask 007
++ IBEX_ROOT=/home/ibexops/IBEX/sw
++ IBEX_ARCH=i686-5.e
++ export IBEX_ROOT IBEX_ARCH
++ '[' -z '' ']'
++ IBEX_SPICE=/home/ibexops/IBEX/sw/i686-5.e/share/isoc/spice
++ SPICE_BIN=/home/ibexops/IBEX/sw/tools/cspice-N0064/exe
++ spicepath=/home/ibexops/IBEX/sw/tools/cspice-N0064/exe
++ export IBEX_SPICE SPICE_BIN
++ '[' -z '#' -a -d /usr/bin ']'
++ javapath=
++ path=/home/ibexops/IBEX/sw/i686-5.e/bin
++ tool_path=/home/ibexops/IBEX/sw/tools/i686-5.e/bin
++ '[' -d /home/ibexops/IBEX/sw/tools/i686-5.e/bin ']'
++ path=/home/ibexops/IBEX/sw/i686-5.e/bin:/home/ibexops/IBEX/sw/tools/i686-5.e/bin
++ '[' -d /home/ibexops/IBEX/sw/tools/cspice-N0064/exe ']'
++ path=/home/ibexops/IBEX/sw/i686-5.e/bin:/home/ibexops/IBEX/sw/tools/i686-5.e/bin:/home/ibexops/IBEX/sw/tools/cspice-N0064/exe
++ '[' -n '' ']'
++ '[' -z /usr/bin:/bin ']'
++ PATH=/home/ibexops/IBEX/sw/i686-5.e/bin:/home/ibexops/IBEX/sw/tools/i686-5.e/bin:/home/ibexops/IBEX/sw/tools/cspice-N0064/exe:/usr/bin:/bin
++ export PATH
++ unset path tool_path spicepath javapath
++ for d in '${IBEX_ROOT}/${IBEX_ARCH}/man' '${IBEX_ROOT}/${IBEX_ARCH}/share/man' '$IBEX_ROOT/tools/$IBEX_ARCH/man' '$IBEX_ROOT/tools/$IBEX_ARCH/share/man'
++ '[' -d /home/ibexops/IBEX/sw/i686-5.e/man ']'
++ '[' -n '' ']'
++ manpath=/home/ibexops/IBEX/sw/i686-5.e/man
++ for d in '${IBEX_ROOT}/${IBEX_ARCH}/man' '${IBEX_ROOT}/${IBEX_ARCH}/share/man' '$IBEX_ROOT/tools/$IBEX_ARCH/man' '$IBEX_ROOT/tools/$IBEX_ARCH/share/man'
++ '[' -d /home/ibexops/IBEX/sw/i686-5.e/share/man ']'
++ for d in '${IBEX_ROOT}/${IBEX_ARCH}/man' '${IBEX_ROOT}/${IBEX_ARCH}/share/man' '$IBEX_ROOT/tools/$IBEX_ARCH/man' '$IBEX_ROOT/tools/$IBEX_ARCH/share/man'
++ '[' -d /home/ibexops/IBEX/sw/tools/i686-5.e/man ']'
++ '[' -n /home/ibexops/IBEX/sw/i686-5.e/man ']'
++ manpath=/home/ibexops/IBEX/sw/i686-5.e/man:/home/ibexops/IBEX/sw/tools/i686-5.e/man
++ for d in '${IBEX_ROOT}/${IBEX_ARCH}/man' '${IBEX_ROOT}/${IBEX_ARCH}/share/man' '$IBEX_ROOT/tools/$IBEX_ARCH/man' '$IBEX_ROOT/tools/$IBEX_ARCH/share/man'
++ '[' -d /home/ibexops/IBEX/sw/tools/i686-5.e/share/man ']'
++ '[' -n /home/ibexops/IBEX/sw/i686-5.e/man:/home/ibexops/IBEX/sw/tools/i686-5.e/man ']'
++ manpath=/home/ibexops/IBEX/sw/i686-5.e/man:/home/ibexops/IBEX/sw/tools/i686-5.e/man:/home/ibexops/IBEX/sw/tools/i686-5.e/share/man
++ '[' -f /etc/man.config -a -z '' ']'
grep ^MANPATH'[^_]' /etc/man.config | cut -f2 |		tr \\012 : | sed 's@:$@@'
+++ grep '^MANPATH[^_]' /etc/man.config
+++ cut -f2
+++ tr '\012' :
+++ sed 's@:$@@'
++ MANPATH=/usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man
++ '[' -n /home/ibexops/IBEX/sw/i686-5.e/man:/home/ibexops/IBEX/sw/tools/i686-5.e/man:/home/ibexops/IBEX/sw/tools/i686-5.e/share/man ']'
++ '[' -z /usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man ']'
++ MANPATH=/home/ibexops/IBEX/sw/i686-5.e/man:/home/ibexops/IBEX/sw/tools/i686-5.e/man:/home/ibexops/IBEX/sw/tools/i686-5.e/share/man:/usr/man:/usr/share/man:/usr/local/man:/usr/local/share/man:/usr/X11R6/man
++ export MANPATH
++ unset manpath mantools
++ for d in '${IBEX_ROOT}/${IBEX_ARCH}/info' '${IBEX_ROOT}/${IBEX_ARCH}/share/info' '$IBEX_ROOT/tools/$IBEX_ARCH/info' '$IBEX_ROOT/tools/$IBEX_ARCH/share/info'
++ '[' -d /home/ibexops/IBEX/sw/i686-5.e/info ']'
++ '[' -n '' ']'
++ infopath=/home/ibexops/IBEX/sw/i686-5.e/info
++ for d in '${IBEX_ROOT}/${IBEX_ARCH}/info' '${IBEX_ROOT}/${IBEX_ARCH}/share/info' '$IBEX_ROOT/tools/$IBEX_ARCH/info' '$IBEX_ROOT/tools/$IBEX_ARCH/share/info'
++ '[' -d /home/ibexops/IBEX/sw/i686-5.e/share/info ']'
++ for d in '${IBEX_ROOT}/${IBEX_ARCH}/info' '${IBEX_ROOT}/${IBEX_ARCH}/share/info' '$IBEX_ROOT/tools/$IBEX_ARCH/info' '$IBEX_ROOT/tools/$IBEX_ARCH/share/info'
++ '[' -d /home/ibexops/IBEX/sw/tools/i686-5.e/info ']'
++ '[' -n /home/ibexops/IBEX/sw/i686-5.e/info ']'
++ infopath=/home/ibexops/IBEX/sw/i686-5.e/info:/home/ibexops/IBEX/sw/tools/i686-5.e/info
++ for d in '${IBEX_ROOT}/${IBEX_ARCH}/info' '${IBEX_ROOT}/${IBEX_ARCH}/share/info' '$IBEX_ROOT/tools/$IBEX_ARCH/info' '$IBEX_ROOT/tools/$IBEX_ARCH/share/info'
++ '[' -d /home/ibexops/IBEX/sw/tools/i686-5.e/share/info ']'
++ '[' -n /home/ibexops/IBEX/sw/i686-5.e/info:/home/ibexops/IBEX/sw/tools/i686-5.e/info ']'
++ '[' -z '' ']'
++ INFOPATH=/home/ibexops/IBEX/sw/i686-5.e/info:/home/ibexops/IBEX/sw/tools/i686-5.e/info
++ export INFOPATH
++ unset infopath
++ perlpath=/home/ibexops/IBEX/sw/i686-5.e/lib/perl5/site_perl
++ perltools=/home/ibexops/IBEX/sw/tools/i686-5.e/lib/perl5/site_perl
++ '[' -d /home/ibexops/IBEX/sw/tools/i686-5.e/lib/perl5/site_perl ']'
++ perlpath=/home/ibexops/IBEX/sw/i686-5.e/lib/perl5/site_perl:/home/ibexops/IBEX/sw/tools/i686-5.e/lib/perl5/site_perl
++ '[' -z '' ']'
++ PERL5LIB=/home/ibexops/IBEX/sw/i686-5.e/lib/perl5/site_perl:/home/ibexops/IBEX/sw/tools/i686-5.e/lib/perl5/site_perl
++ export PERL5LIB
++ unset perlpath perltools
++ idl_path=/home/ibexops/IBEX/sw/i686-5.e/share/isoc/idl
++ idl_tools=/home/ibexops/IBEX/sw/tools/i686-5.e/share/idl
++ '[' -d /home/ibexops/IBEX/sw/tools/i686-5.e/share/idl ']'
++ idl_fixme=/home/ibexops/IBEX/sw/i686-5.e/share/idl
++ '[' -d /home/ibexops/IBEX/sw/i686-5.e/share/idl ']'
++ '[' -z '' ']'
++ IDL_PATH='/home/ibexops/IBEX/sw/i686-5.e/share/isoc/idl:<IDL_DEFAULT>'
++ export IDL_PATH
++ unset idl_path idl_tools
++ type -t gdfontpath.sh
gdfontpath.sh
+++ gdfontpath.sh
++ eval export GNUPLOT_DEFAULT_GDFONT=arial export GDFONTPATH=/usr/share/fonts/msttcore/
export GNUPLOT_DEFAULT_GDFONT=arial export GDFONTPATH=/usr/share/fonts/msttcore/
+++ export GNUPLOT_DEFAULT_GDFONT=arial export GDFONTPATH=/usr/share/fonts/msttcore/
+++ GNUPLOT_DEFAULT_GDFONT=arial
+++ GDFONTPATH=/usr/share/fonts/msttcore/
++ pythonpath=/home/ibexops/IBEX/sw/i686-5.e/python
++ pythontools=/home/ibexops/IBEX/sw/tools/i686-5.e/python
++ '[' -d /home/ibexops/IBEX/sw/tools/i686-5.e/python ']'
++ '[' -z '' ']'
++ PYTHONPATH=/home/ibexops/IBEX/sw/i686-5.e/python
++ export PYTHONPATH
++ unset pythonpath
++ '[' -z '#' ']'
++ '[' -z true ']'
++ IBEX_SETUP=true
++ export IBEX_SETUP

#
# Conventionally IBEX_ROOT would be IBEX_HOME/sw
#
[ -z "$IBEX_HOME" ] && {
	ibex_home=`dirname $IBEX_ROOT`
	IBEX_HOME=$ibex_home
	unset ibex_home
}
++ '[' -z /home/ibexops/IBEX ']'
export IBEX_HOME
++ export IBEX_HOME
# give the human a clue
[ -z "$IBEX_QUIET" ] &&
	echo IBEX_HOME is set to $IBEX_HOME
++ '[' -z true ']'

#
# Other variables that can just be reset as required to support
# different physical disk layouts and different processing needs.
# All tools and scripts should reference these areas via these
# environment variables (rather than using absolute pathnames).
#
# the root of the (installed) software tree
# IBEX_ROOT=$IBEX_HOME/sw   ; export IBEX_ROOT
# 

# where to find ancillary (e.g. quasi-stable external) data
export IBEX_ANC=$IBEX_HOME/anc
++ export IBEX_ANC=/home/ibexops/IBEX/anc
++ IBEX_ANC=/home/ibexops/IBEX/anc
export IBEX_SPICE_WORK=$IBEX_HOME/anc/isoc
++ export IBEX_SPICE_WORK=/home/ibexops/IBEX/anc/isoc
++ IBEX_SPICE_WORK=/home/ibexops/IBEX/anc/isoc

# where to find project calibration data
# IBEX_CAL=$IBEX_HOME/cal     ; export IBEX_CAL

# where day-to-day ops and other configuration data
IBEX_OPS=$IBEX_HOME/ops     ; export IBEX_OPS
++ IBEX_OPS=/home/ibexops/IBEX/ops
++ export IBEX_OPS

# a web staging area
# IBEX_WEB=$IBEX_HOME/web     ; export IBEX_WEB

# the archive of raw (all input to ISOC) data
IBEX_RAW=$IBEX_HOME/raw	    ; export IBEX_RAW
++ IBEX_RAW=/home/ibexops/IBEX/raw
++ export IBEX_RAW

# an orbit-based source/product archive root
#	We actually us $IBEX_HOME/$IBEX_ID/orbit
#	but this reserves the name
# IBEX_ORBIT=$IBEX_HOME/orbit ; export IBEX_ORBIT
# subdirs o0NNN for leops orbits
# subdirs o1NNN for science orbits
# subdirs o2NNN for no-definitive science orbits
# subdirs o6NNN for ops test orbits
# subdirs o7NNN for real-IBEX test data orbits
# subdirs o8NNN for prelaunch fake data orbits
# subdirs o9NNN for mission sim fake data orbits

# a non-orbit-based product archive root
#	We actually us $IBEX_HOME/$IBEX_ID/prod
#	but this reserves the name
# IBEX_PROD=$IBEX_HOME/prod   ; export IBEX_PROD
# subdirs Lx.y for unspecified products
# or TBD named-for-content subdirs

# a place in which working directories may be created
IBEX_WORK=$IBEX_HOME/work   ; export IBEX_WORK
++ IBEX_WORK=/home/ibexops/IBEX/work
++ export IBEX_WORK
# tasks can expect to create $IBEX_WORK/whatever as needed.
# and expect the directories to last for a few hours....

#
# other miscellaneous variables
#

# this is the source home for crontab driven tasks
[ -z "$IBEX_CRON" ] && {
	# what you might find in (SVN) development environment
	[ -d $IBEX_HOME/sw/isoc/src/ops/admin ] &&
		IBEX_CRON=$IBEX_HOME/sw/isoc/src/ops/admin
	# what you might find in the release environment
	[ -d $IBEX_HOME/sw/isoc-5.e/ops/admin ] &&
		IBEX_CRON=$IBEX_HOME/sw/isoc-5.e/ops/admin
	# an alternate path to SVN development
	[ -d $IBEX_OPS/admin ] &&
		IBEX_CRON=$IBEX_OPS/admin
}
++ '[' -z /home/ibexops/IBEX/sw/isoc/src/ops/admin ']'
export IBEX_CRON
++ export IBEX_CRON

#
# eof
#

[ -d "$IBEX_OPS/log" ] || mkdir $IBEX_OPS/log
+ '[' -d /home/ibexops/IBEX/ops/log ']'
[ -d "$IBEX_OPS/log" ] || {
	echo $ME: No IBEX_OPS/log directory \($IBEX_OPS/log\). 1>&2
	exit 4
}
+ '[' -d /home/ibexops/IBEX/ops/log ']'
[ -d "$IBEX_WORK/cron" ] || mkdir $IBEX_WORK/cron
+ '[' -d /home/ibexops/IBEX/work/cron ']'
[ -d "$IBEX_WORK/cron" ] && cd $IBEX_WORK/cron || {
	echo $ME: cd IBEX_WORK/cron failed \($IBEX_WORK/cron\). 1>&2
	exit 5
}
+ '[' -d /home/ibexops/IBEX/work/cron ']'
+ cd /home/ibexops/IBEX/work/cron

#
# pick a time and start a log--ideally, use ibex_time -X +0s,
# but if we're rebuilding from scratch this might not yet exist.
#
ts=`date -u +%Y.%j.%H.%M.%S`
date -u +%Y.%j.%H.%M.%S
++ date -u +%Y.%j.%H.%M.%S
+ ts=2018.033.13.25.01
log=$IBEX_OPS/log/$1-$ts.log
+ log=/home/ibexops/IBEX/ops/log/rsync-raw-web-2018.033.13.25.01.log
#
# preserve stdout/stderr as 3/4 in case a lower level needs to SCREAM
# note that crontabs direct 1>/dev/null (in normal operations).
#
exec 3>&1 4>&2 1>$log
+ exec
export ECHO34=true
+ export ECHO34=true
+ ECHO34=true
echo ""
+ echo ''
echo "AT: $ts"
+ echo 'AT: 2018.033.13.25.01'
echo ""
+ echo ''
echo $ME "$@"
+ echo cronswitch.sh rsync-raw-web
echo ""
+ echo ''
echo "IBEX_HOME=$IBEX_HOME"
+ echo IBEX_HOME=/home/ibexops/IBEX
echo "IBEX_ROOT=$IBEX_ROOT"
+ echo IBEX_ROOT=/home/ibexops/IBEX/sw
echo "IBEX_CRON=$IBEX_CRON"
+ echo IBEX_CRON=/home/ibexops/IBEX/sw/isoc/src/ops/admin
echo "IBEX_ARCH=$IBEX_ARCH"
+ echo IBEX_ARCH=i686-5.e
echo "IBEX_PRIMARY=$IBEX_PRIMARY"
+ echo IBEX_PRIMARY=true
echo ""
+ echo ''

#
# tell syslog about it
#
env
+ env
ls -latr /home/ibexops/IBEX/sw/i686-5.e/bin/ilog.sh
+ ls -latr /home/ibexops/IBEX/sw/i686-5.e/bin/ilog.sh
echo $?
+ echo 0
which ilog.sh
+ which ilog.sh
echo $?
+ echo 0
ilog.sh -w $ME Args: "$@"
+ ilog.sh -w cronswitch.sh Args: rsync-raw-web

case $1 in
printenv)
	# feedback on environment
	echo $ME with environment:
	rm -f $log
	printenv >&3
	;;
nightly)
	# nightly build
	echo executing nightly ...
	exec $IBEX_CRON/nightly.sh $log ${2-"DISABLED"}
	;;
misc_update)
	# svn updates on a few key areas
	echo executing misc svn update ...
	exec $IBEX_CRON/misc_update.sh $log
	;;
ical_update)
	# svn updates on a few key areas
	echo executing ical_update ...
	exec $IBEX_CRON/ical_update.sh $log
	;;
ssr_blk_update)
	# svn updates on a few key areas
	echo executing ssr_blk_update ...
	exec $IBEX_CRON/ssr_blk_update.sh $log
	;;
sftp_driver)
	# this drives the SFTP mirror of Orbital
	echo executing sftp driver ...
	exec $IBEX_CRON/sftp_driver.sh ${2-"noop"} $log
	;;
wakeup)
	# this looks for things to be done and does it
	echo executing wakeup driver ...
	exec $IBEX_CRON/wakeup_driver.sh $log
	;;
pipe*)
	# conditionally launch pipeline processing
	echo handing off to pipe_switch ...
	mv $log $IBEX_OPS/log/pipe-$ts.log
	export CRONLOG=$IBEX_OPS/log/pipe-$ts.log
	exec $IBEX_CRON/pipe_switch.sh "$@"
	;;
rsync*|rlist*)
	# hand off to another switch
	echo executing rsync action $1...
	export IBEX_HOME=/usr/local/IBEX
	. $e
	nlog=$IBEX_OPS/log/rsync-$ts.log
	# avoid some selinux race condition with: mv $log $nlog
	cat $log >$nlog
	rm -f $log
	echo executing $IBEX_CRON/rsync_switch.sh $1 $nlog 1>>$nlog
	exec $IBEX_CRON/rsync_switch.sh $1 $nlog 1>>$nlog
	;;
cleanup)
	# log cleanup
	echo \
	$IBEX_CRON/misc_cleanup.sh $log
	$IBEX_CRON/misc_cleanup.sh $log
	;;
websaver)
	echo \
	$IBEX_CRON/web_saver.sh $log true
	$IBEX_CRON/web_saver.sh $log true
	;;
svn-*)
	echo \
	$IBEX_CRON/scripts/anal-isoc-ibex.sh "$@"
	$IBEX_CRON/scripts/anal-isoc-ibex.sh "$@"
	# echo See $log 1>&2
	egrep 'writing|already' $log | sort 1>&2
	;;
epo)
	# a starter for E/PO
	$IBEX_CRON/scripts/epo_orbit_plot.sh
	rm -f $log
	;;
bash)
	# switch to a (bash) shell
	rm -f $log
	exec /bin/bash 1>&3
	;;
*)
	# crontab error
	echo Unknown option "$@" 1>&2
	exit 6
	;;
esac
+ case $1 in
+ echo executing rsync action rsync-raw-web...
+ export IBEX_HOME=/usr/local/IBEX
+ IBEX_HOME=/usr/local/IBEX
+ . /home/ibexops/IBEX/sw/i686-5.e/bin/isoc.sh
#!/bin/sh
#
# (Ba)sh startup for ISOC work
#
# $Id: isoc.sh.in 6050 2010-01-03 21:37:07Z gbc $
#
# Version 5.e
#

#
# Help for the befuddled user.  The name is probably isoc.sh.
#
zero=$0
++ zero=/home/ibexops/IBEX/sw/isoc/src/ops/admin/cronswitch.sh
[ "$zero" = -bash -o pc = apple ] && zero=isoc.sh
++ '[' /home/ibexops/IBEX/sw/isoc/src/ops/admin/cronswitch.sh = -bash -o pc = apple ']'
Me=`basename $zero`
basename $zero
+++ basename /home/ibexops/IBEX/sw/isoc/src/ops/admin/cronswitch.sh
++ Me=cronswitch.sh
Help="Usage: . $Me

to set up your IBEX environment.  This includes the creation
and/or modifications to the following environment variables:

	IBEX_*
	PATH MANPATH INFOPATH CLASSPATH
	PERL5LIB IDL_PATH PYTHONPATH

NOTE: PATH variables are not adjusted if the IBEX_SETUP variable
is something other than an empty string.  Generally speaking, many
of the IBEX_* variables may be reset to point somewhere else after
this script has set up defaults for them.  Resetting IBEX_HOME
to point somewhere else, and re-sourcing this script re-sets them
all to point to subdirs of IBEX_HOME.
"
++ Help='Usage: . cronswitch.sh

to set up your IBEX environment.  This includes the creation
and/or modifications to the following environment variables:

	IBEX_*
	PATH MANPATH INFOPATH CLASSPATH
	PERL5LIB IDL_PATH PYTHONPATH

NOTE: PATH variables are not adjusted if the IBEX_SETUP variable
is something other than an empty string.  Generally speaking, many
of the IBEX_* variables may be reset to point somewhere else after
this script has set up defaults for them.  Resetting IBEX_HOME
to point somewhere else, and re-sourcing this script re-sets them
all to point to subdirs of IBEX_HOME.
'
Version="/home/ibexops/IBEX/sw/isoc/src/$Me	[ Jan 07 02:35:40 UTC 2018 ]"
++ Version='/home/ibexops/IBEX/sw/isoc/src/cronswitch.sh	[ Jan 07 02:35:40 UTC 2018 ]'
case "nada$1" in
nada--help)	echo "$Help"    ; exit 0 ;;
nada--version)	echo "$Version" ; exit 0 ;;
nada)	;;
esac
++ case "nada$1" in
unset Velp Version
++ unset Velp Version

[ -z "$IBEX_SETUP" ] && {
#
# head: wrap the whole thing based on IBEX_SETUP
#

#
# force cooperative policy
#
umask 007

#
# basic environment variables
#
IBEX_ROOT=/home/ibexops/IBEX/sw
IBEX_ARCH=i686-5.e
export IBEX_ROOT IBEX_ARCH

#
# C_INCLUDE_PATH and LIBRARY_PATH should not be needed.
# but LIBRARY_PATH, C_INCLUDE_PATH, STABLE_LIB, STABLE_INCLUDE
# are configured.
#

#
# SPICE
#
[ -z "" ] && {
	IBEX_SPICE=/home/ibexops/IBEX/sw/i686-5.e/share/isoc/spice
	SPICE_BIN=/home/ibexops/IBEX/sw/tools/cspice-N0064/exe
	spicepath=/home/ibexops/IBEX/sw/tools/cspice-N0064/exe
} || {
	SPICE_BIN=
	spicepath=
}
export IBEX_SPICE SPICE_BIN

#
# JAVA Path
#
[ -z "#" -a -d "/usr/bin" ] &&
	javapath="/usr/bin" || javapath=

#
# PATH -- isoc tools come first to allow overrides
#
path=${IBEX_ROOT}/${IBEX_ARCH}/bin
tool_path=$IBEX_ROOT/tools/$IBEX_ARCH/bin
[ -d $tool_path ] && path=${path}:${tool_path}
[ -d "$spicepath" ] && path=${path}:${spicepath}
[ -n "$javapath" ] && path=${path}:${javapath}
[ -z "$PATH" ] &&
       PATH=${path} ||
       PATH=${path}:$PATH
export PATH ; unset path tool_path spicepath javapath

#
# MANPATH
#
for d in ${IBEX_ROOT}/${IBEX_ARCH}/man \
	 ${IBEX_ROOT}/${IBEX_ARCH}/share/man \
	 $IBEX_ROOT/tools/$IBEX_ARCH/man \
	 $IBEX_ROOT/tools/$IBEX_ARCH/share/man
    do [ -d $d ] &&
	{ [ -n "$manpath" ] && manpath=${manpath}:$d || manpath=$d; }
    done
[ -f /etc/man.config -a -z "$MANPATH" ] &&
       MANPATH=`grep ^MANPATH'[^_]' /etc/man.config | cut -f2 |\
		tr \\\\012 : | sed 's@:$@@'`
[ -n "$manpath" ] &&
    [ -z "$MANPATH" ] &&
       MANPATH=${manpath} ||
       MANPATH=${manpath}:$MANPATH
export MANPATH ; unset manpath mantools

#
# INFOPATH
#
for d in ${IBEX_ROOT}/${IBEX_ARCH}/info \
	 ${IBEX_ROOT}/${IBEX_ARCH}/share/info \
	 $IBEX_ROOT/tools/$IBEX_ARCH/info \
	 $IBEX_ROOT/tools/$IBEX_ARCH/share/info
    do [ -d $d ] &&
	{ [ -n "$infopath" ] && infopath=${infopath}:$d || infopath=$d; }
    done
[ -n "$infopath" ] &&
    [ -z "$INFOPATH" ] &&
       INFOPATH=${infopath} ||
       INFOPATH=${infopath}:$INFOPATH
export INFOPATH ; unset infopath

#
# PERL
#
# Things preloaded in @INC; Cf. use lib "/this"; use lib "/that";
#
perlpath=${IBEX_ROOT}/${IBEX_ARCH}/lib/perl5/site_perl
perltools=${IBEX_ROOT}/tools/${IBEX_ARCH}/lib/perl5/site_perl
[ -d $perltools ] && perlpath=${perlpath}:${perltools}
[ -z "$PERL5LIB" ] &&
       PERL5LIB=${perlpath} ||
       PERL5LIB=${perlpath}:$PERL5LIB
export PERL5LIB ; unset perlpath perltools

#
# IDL
#
# If IDL_PATH is defined, <IDL_DEFAULT> is needed for system libraries
# $idl_fixme is transitional--it should go away.
#
idl_path=${IBEX_ROOT}/${IBEX_ARCH}/share/isoc/idl
idl_tools=${IBEX_ROOT}/tools/${IBEX_ARCH}/share/idl
[ -d $idl_tools ] && idl_path=${idl_path}:${idl_tools}
idl_fixme=${IBEX_ROOT}/${IBEX_ARCH}/share/idl
[ -d $idl_fixme ] && idl_path=${idl_path}:${idl_fixme}
[ -z "$IDL_PATH" ] &&
       IDL_PATH=${idl_path}:'<IDL_DEFAULT>' ||
       IDL_PATH=${idl_path}:$IDL_PATH
export IDL_PATH ; unset idl_path idl_tools

#
# GNUPLOT
#
type -t gdfontpath.sh >/dev/null && eval `gdfontpath.sh`

#
# PYTHON
#
pythonpath=${IBEX_ROOT}/${IBEX_ARCH}/python
pythontools=$IBEX_ROOT/tools/$IBEX_ARCH/python
[ -d $pythontools ] && pythonpath=${pythonpath}:${pythontools}
[ -z "$PYTHONPATH" ] &&
       PYTHONPATH=${pythonpath} ||
       PYTHONPATH=${pythonpath}:$PYTHONPATH
export PYTHONPATH ; unset pythonpath

#
# JAVA Classpath
#
[ -z "#" ] && {
	classpath=${IBEX_ROOT}/${IBEX_ARCH}/share/java
	toolspath=${IBEX_ROOT}/tools/${IBEX_ARCH}/share/java
	[ -d $toolspath ] && classpath=${classpath}:${toolspath}
	[ -z "$CLASSPATH" ] &&
	       CLASSPATH=${classpath} ||
	       CLASSPATH=${classpath}:$CLASSPATH
	export CLASSPATH
	unset classpath toolspath
}

#
# all done
#
[ -z "$IBEX_QUIET" ] &&
	echo Setup ISOC version 5.e with IBEX_ROOT=$IBEX_ROOT
IBEX_SETUP=true
export IBEX_SETUP

#
# tail: wrap the whole thing based on IBEX_SETUP
#
} || {
#
# just tell the human what was previously set up
#
[ -z "$IBEX_QUIET" ] &&
	echo Using ISOC version 5.e with IBEX_ROOT=$IBEX_ROOT
}
++ '[' -z true ']'
++ '[' -z true ']'

#
# Conventionally IBEX_ROOT would be IBEX_HOME/sw
#
[ -z "$IBEX_HOME" ] && {
	ibex_home=`dirname $IBEX_ROOT`
	IBEX_HOME=$ibex_home
	unset ibex_home
}
++ '[' -z /usr/local/IBEX ']'
export IBEX_HOME
++ export IBEX_HOME
# give the human a clue
[ -z "$IBEX_QUIET" ] &&
	echo IBEX_HOME is set to $IBEX_HOME
++ '[' -z true ']'

#
# Other variables that can just be reset as required to support
# different physical disk layouts and different processing needs.
# All tools and scripts should reference these areas via these
# environment variables (rather than using absolute pathnames).
#
# the root of the (installed) software tree
# IBEX_ROOT=$IBEX_HOME/sw   ; export IBEX_ROOT
# 

# where to find ancillary (e.g. quasi-stable external) data
export IBEX_ANC=$IBEX_HOME/anc
++ export IBEX_ANC=/usr/local/IBEX/anc
++ IBEX_ANC=/usr/local/IBEX/anc
export IBEX_SPICE_WORK=$IBEX_HOME/anc/isoc
++ export IBEX_SPICE_WORK=/usr/local/IBEX/anc/isoc
++ IBEX_SPICE_WORK=/usr/local/IBEX/anc/isoc

# where to find project calibration data
# IBEX_CAL=$IBEX_HOME/cal     ; export IBEX_CAL

# where day-to-day ops and other configuration data
IBEX_OPS=$IBEX_HOME/ops     ; export IBEX_OPS
++ IBEX_OPS=/usr/local/IBEX/ops
++ export IBEX_OPS

# a web staging area
# IBEX_WEB=$IBEX_HOME/web     ; export IBEX_WEB

# the archive of raw (all input to ISOC) data
IBEX_RAW=$IBEX_HOME/raw	    ; export IBEX_RAW
++ IBEX_RAW=/usr/local/IBEX/raw
++ export IBEX_RAW

# an orbit-based source/product archive root
#	We actually us $IBEX_HOME/$IBEX_ID/orbit
#	but this reserves the name
# IBEX_ORBIT=$IBEX_HOME/orbit ; export IBEX_ORBIT
# subdirs o0NNN for leops orbits
# subdirs o1NNN for science orbits
# subdirs o2NNN for no-definitive science orbits
# subdirs o6NNN for ops test orbits
# subdirs o7NNN for real-IBEX test data orbits
# subdirs o8NNN for prelaunch fake data orbits
# subdirs o9NNN for mission sim fake data orbits

# a non-orbit-based product archive root
#	We actually us $IBEX_HOME/$IBEX_ID/prod
#	but this reserves the name
# IBEX_PROD=$IBEX_HOME/prod   ; export IBEX_PROD
# subdirs Lx.y for unspecified products
# or TBD named-for-content subdirs

# a place in which working directories may be created
IBEX_WORK=$IBEX_HOME/work   ; export IBEX_WORK
++ IBEX_WORK=/usr/local/IBEX/work
++ export IBEX_WORK
# tasks can expect to create $IBEX_WORK/whatever as needed.
# and expect the directories to last for a few hours....

#
# other miscellaneous variables
#

# this is the source home for crontab driven tasks
[ -z "$IBEX_CRON" ] && {
	# what you might find in (SVN) development environment
	[ -d $IBEX_HOME/sw/isoc/src/ops/admin ] &&
		IBEX_CRON=$IBEX_HOME/sw/isoc/src/ops/admin
	# what you might find in the release environment
	[ -d $IBEX_HOME/sw/isoc-5.e/ops/admin ] &&
		IBEX_CRON=$IBEX_HOME/sw/isoc-5.e/ops/admin
	# an alternate path to SVN development
	[ -d $IBEX_OPS/admin ] &&
		IBEX_CRON=$IBEX_OPS/admin
}
++ '[' -z /home/ibexops/IBEX/sw/isoc/src/ops/admin ']'
export IBEX_CRON
++ export IBEX_CRON

#
# eof
#
+ nlog=/usr/local/IBEX/ops/log/rsync-2018.033.13.25.01.log
+ cat /home/ibexops/IBEX/ops/log/rsync-raw-web-2018.033.13.25.01.log
+ rm -f /home/ibexops/IBEX/ops/log/rsync-raw-web-2018.033.13.25.01.log
+ echo executing /home/ibexops/IBEX/sw/isoc/src/ops/admin/rsync_switch.sh rsync-raw-web /usr/local/IBEX/ops/log/rsync-2018.033.13.25.01.log
+ exec /home/ibexops/IBEX/sw/isoc/src/ops/admin/rsync_switch.sh rsync-raw-web /usr/local/IBEX/ops/log/rsync-2018.033.13.25.01.log


More information about the Isocops mailing list