/[TIS-4000 Rel T60]/scripts/stop_TIS
ViewVC logotype

Contents of /scripts/stop_TIS

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.5 - (show annotations)
Fri Sep 29 17:29:45 2000 UTC (22 years, 11 months ago) by tis4000
Branch: MAIN
CVS Tags: SPR653, Duluth_baseline, LMC_baseline, HEAD
Changes since 1.4: +2 -2 lines
SPR 653
Enclose the kill statements in () so that if kill fails the script will continue to execute. - Steel

1 #!/usr/bin/csh
2 #
3 # Shuts Down the TIS4000 software
4 #
5 set displays = (dm edd trendvu alarmvu alarmConfig dataVu TagvuClient snlvu snapedit LogReport OpNoteClient UddsEditor opNote tagvu tisPermissions)
6
7 set processes = (trendProcessor alarmConfig alarmvu dm edd dataVu trendvu snlvu TagvuClient snapedit alarmPrinter alarmMgr dbClient nameSrv chanAcq png2 tisTime LogReport tisCard dpa OpNoteClient UddsEditor opNote tagvu tisPermissions)
8
9 set done="false"
10 set answer=""
11 #set id = ""
12
13 foreach display ($displays)
14 set fn=`/usr/bin/ps -ef | grep $display | grep -v vdm | grep -v sendmail | grep -v xdm | grep -v adm | grep -v grep | grep -v dmi | awk '{print $2}'`
15 if ($#fn && $answer == "") then
16 echo ""
17 echo "There is an active display present on this system - $display."
18 echo "If it is dm or alarmvu or trendvu or snapedit or tagvu and you answer yes, "
19 echo "you will lose all of your graphics (dm), alarmvu, trendvu, snapedit, and tagvu displays."
20 echo ""
21 while ($answer != "yes" && $answer != "no")
22 echo -n "Do you wish to continue? [yes/no]: "
23 set answer=$<
24 end
25 endif
26 if ($answer == "no") then
27 exit 1
28 else
29 set answer=""
30 endif
31 end
32
33 if ($answer == "yes" || $answer == "") then
34
35 echo ""
36 echo "****** Stopping TIS4000 and Background Processes ******"
37 echo ""
38
39 pushd /tis4000/tasks
40 ./stopJava
41 popd
42
43 foreach process ($processes)
44 set pid=`/usr/bin/ps -ef | grep $process | grep -v vdm | grep -v sendmail | grep -v xdm | grep -v adm | grep -v grep | grep -v dmi | awk '{print $2}'`
45 if ($#pid) then
46 echo ""
47 echo "****** Shutting Down $process ******"
48 echo ""
49 if ($process == "oracleTrendProcessor" || $process == "dataVu" || $process == "alarmMgr" || $process == "dbClient" || $process == "trendProcessor" || $process == "dpa") then
50 (kill -INT $pid)
51 else
52 (kill $pid)
53 endif
54 endif
55 end
56 #
57 # Use "trendServer" for non Oracle trending or "oracleTrendServer" for Oracle trending.
58 # set var="trendServer"
59 set var="oracleTrendServer"
60 set pid=`/usr/bin/ps -ef | grep $var | grep -v vdm | grep -v sendmail | grep -v xdm |grep -v xdm | grep -v adm | grep -v grep | awk '{print $2}'`
61 echo "****** Waiting for trendServer Shutdown ******"
62 echo "****** THIS MAY TAKE SEVERAL MINUTES ******"
63 while ($done == "false")
64 if ($#pid) then
65 set pid=`/usr/bin/ps -ef | grep $var | grep -v vdm | grep -v sendmail | grep -v xdm | grep -v adm | grep -v grep | awk '{print $2}'`
66 else
67 set done="true"
68 endif
69 echo ""
70 echo "****** Removing files from /tis4000/operators/logins ******"
71 echo ""
72 rm -f /tis4000/operators/logins/*
73 end
74 echo ""
75 echo "****** Completed Stopping TIS4000 Background Processes ******"
76 echo ""
77 else
78 exit 1
79 endif
80

  ViewVC Help
Powered by ViewVC 1.1.30