-
Notifications
You must be signed in to change notification settings - Fork 6
/
ionstop
executable file
·65 lines (62 loc) · 1.65 KB
/
ionstop
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#!/bin/bash
#
# ionstop
# David Young
# Aug 20, 2008
#
# Modified Apr 17, 2023, perform killm only, gitlab issue #212
#
# will quickly and completely stop an ion node.
ION_OPEN_SOURCE=1
# Check for multi-ION instances
if [ -z "${ION_NODE_LIST_DIR}" ];
then
echo "This is a single-ION instance configuration. Run killm."
sleep 1
echo "killm"
killm
else
echo "This is a multi-ION instance configuration. Killm not invoked."
echo "Each moduels will shutdown individually. You may want to use a customized script."
if [[ -z "${ION_NODE_WDNAME}" ]]; then
echo "ION_NODE_WDNAME not defined. Assume we are already in the proper working directory."
CURRENT_WD=$(pwd)
echo "Shutdown ION instances associated with the current directory $CURRENT_WD"
else
CURRENT_WD=${ION_NODE_WDNAME}
echo "Shutdown ION instances associated with the specified directory: $ION_NODE_WDNAME"
fi
if [ "$ION_OPEN_SOURCE" == "1" ]; then
echo "cfdpadmin ."
cfdpadmin .
sleep 1
fi
bpversion
if [ $? -eq 6 ]; then
echo "acsadmin ."
acsadmin .
sleep 1
echo "imcadmin ."
imcadmin .
sleep 1
fi
echo "bpadmin ."
bpadmin .
sleep 1
echo "ipndmin ."
bpadmin .
sleep 1
echo "ltpadmin ."
ltpadmin .
sleep 1
echo "ionadmin ."
ionadmin .
sleep 1
echo "bsspadmin ."
bsspadmin .
sleep 1
echo "ION instance in $CURRENT_WD ended, please double-check that all processes were terminated."
echo "Use killm to clear out all remaining shared memory allocations and semaphore if needed."
fi
echo "ION node ended. Log file: ion.log"
echo ""