Skip to content

Commit 8930c81

Browse files
committed
removed useless comments
1 parent 6a249ee commit 8930c81

File tree

2 files changed

+100
-8
lines changed

2 files changed

+100
-8
lines changed

Oracle Scripts/MWA/mwa_ctrl.sh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,3 @@ case "$1" in
9090
echo $"Usage: $0 {start|stop|status|restart}"
9191
esac
9292
exit 0
93-
94-
95-
96-
#. /home/appldev/start_stop.env
97-
#sh /DEV/oracle/devappl/mwa/11.5.0/bin/mwactl.sh start 2323 &
98-
#cd /DEV/oracle/devappl/mwa/11.5.0/bin/
99-
#sh mwactl.sh start_dispatcher &
100-

Oracle Scripts/MWA/mwa_ctrl.sh~

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#!/bin/bash
2+
3+
#######################################################
4+
##### DEV MWA START / STOP SCRIPT #####
5+
#######################################################
6+
##### modified by: bthompso #####
7+
##### modified date: 11/19/2013 #####
8+
#######################################################
9+
#######################################################
10+
11+
source ~/mwa_ctrl.conf
12+
13+
if [ -n "$2" ]; then
14+
ports="$2"
15+
fi
16+
17+
18+
# start function
19+
start() {
20+
for i in $ports
21+
do
22+
pid=`ps -ef | grep mwa | grep $i | grep -v mwa_ctrl.sh | awk {' print $2 '}`
23+
if [ $pid > 0 ]; then
24+
echo "Warning mwa server on port $i is already running -- please stop first"
25+
else
26+
$MWACTL start $i &
27+
fi
28+
done
29+
30+
31+
32+
}
33+
34+
35+
36+
# stop function
37+
stop() {
38+
for i in $ports
39+
do
40+
$MWACTL -login $sysad_user/$sysad_pwd stop_force $i
41+
sleep 10
42+
pid=`ps -ef | grep mwa | grep $i | grep -v mwa_ctrl.sh | awk {' print $2 '}`
43+
ps -ef | grep mwa | grep $i
44+
if [ $pid > 0 ]; then
45+
echo "Warning mwa server on port $i failed to stop, sending signal 15 to kill process, please recheck"
46+
kill -15 $pid
47+
fi
48+
49+
done
50+
}
51+
52+
restart() {
53+
stop
54+
start
55+
}
56+
57+
status() {
58+
for i in $ports
59+
do
60+
pid=`ps -ef | grep mwa | grep $i | grep -v mwa_ctrl.sh | awk {' print $2 '}`
61+
users=`netstat -an | grep 10.80.1.17 | grep $i | wc -l`
62+
if [ $pid > 0 ]; then
63+
echo -e "server $i is running \t pid: \t $pid \t users: \t $users";
64+
else
65+
echo "WARNING server $i is stopped";
66+
fi
67+
done
68+
}
69+
70+
71+
72+
### main logic ###
73+
74+
case "$1" in
75+
start)
76+
start
77+
;;
78+
stop)
79+
stop
80+
;;
81+
restart)
82+
start
83+
stop
84+
;;
85+
status)
86+
status
87+
;;
88+
89+
*)
90+
echo $"Usage: $0 {start|stop|status|restart}"
91+
esac
92+
exit 0
93+
94+
95+
96+
#. /home/appldev/start_stop.env
97+
#sh /DEV/oracle/devappl/mwa/11.5.0/bin/mwactl.sh start 2323 &
98+
#cd /DEV/oracle/devappl/mwa/11.5.0/bin/
99+
#sh mwactl.sh start_dispatcher &
100+

0 commit comments

Comments
 (0)