#!/bin/csh -f
# kill all telescope-related daemons and tools.

set common = (xobs shm rund telrun telescoped.csi telescoped.oms telescoped.vir camerad csimcd)
set more =   (camera telsched xephem)

if ($#argv == 1 && $1 != "-all") then
    echo "$0:t"": [-all]"
    echo "  always kill: $common"
    echo "    -all adds: $more"
    exit 1
endif

if ($1 == "-all") set all

# do apps then daemons so apps don't discover trouble on their own and fuss

foreach p ($common)
    echo -n "$p "
    killp -q $p
end

if ($?all) then
    foreach p ($more)
	echo -n "$p "
	killp -q $p
    end
endif

echo ""

# For RCS Only -- Do Not Edit
# @(#) $RCSfile: killTel,v $ $Date: 2003/04/15 20:48:39 $ $Revision: 1.1.1.1 $ $Name:  $
