#!/bin/sh # a shell script to start CalcServer # chkconfig: 345 99 99 # description: calcserver - VLBA software correlator export CALC_USER=C export WET_ATM=Y export JPLEPH=@prefix@/share/CalcServer/JPLEPH export SERVERLOG=ON export HORIZONS_FILENAME=@prefix@/share/CalcServer/Horizons.lis export HORIZONS_SRCNAME=TSTCURVE serverlist="CalcServer CALC_9_1_RA_Server" start() { pushd /tmp for server in $serverlist do echo "starting ${server}" @prefix@/bin/"${server}" > /dev/null 2>&1 & done popd } stop() { for server in $serverlist do echo "terminating ${server} that is currently" killall "${server}" done } case "$1" in start) start ;; stop) stop ;; restart) stop && start ;; *) echo $"Usage: $0 {start|stop|restart}" exit 1 esac