#!/bin/sh # # CONFIGURABLE CONSTANTS LOGFILE=/tmp/restartfsicl.log # # begin logging # if [ "$1" = "-t" ] then shift else exec >>$LOGFILE 2>&1 fi echo `date` "$0" echo arguments: "$*" # # ADMIN and CAREVUE, CVHOST, CVUSER are set from either the environment # or from the files /usr/hl7/etc/{admin,carevue} # if [ -z "$ADMIN" ] then if [ -r /usr/hl7/etc/admin ] then export ADMIN=`cat /usr/hl7/etc/admin` else if [ -n "$USER" ] then export ADMIN="$USER" else echo who are you? please define USER, ADMIN or /usr/hl7/etc/admin >&2 exit 2 fi fi fi if [ -z "$CAREVUE" ] then if [ -r /usr/hl7/etc/carevue ] then export CAREVUE=`cat /usr/hl7/etc/carevue` export CVUSER=`expr "$CAREVUE" : '^\([^@]*\)@.*$'` export CVHOST=`expr "$CAREVUE" : '^[^@]*@\(.*\)$'` else echo must define environment CAREVUE or /usr/hl7/etc/carevue >&2 exit 2 fi fi # # This function faciliates remote execution commands in the CHARTING # domain # remote() { rsh -K -l $CVUSER $CVHOST " . /usr/M1215A/carevue/etc/carevue_env ; . /usr/M1215A/carevue/etc/go_charting ; $*" } # # # # remote "pmstart -r FSICLIENT" sleep 5