Skip to content
This repository was archived by the owner on May 5, 2020. It is now read-only.

Commit 3ab02db

Browse files
committed
Tidy up formatting
1 parent 7c141da commit 3ab02db

File tree

3 files changed

+77
-76
lines changed

3 files changed

+77
-76
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.DS_Store

server/mq-license-check.sh

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -16,32 +16,32 @@
1616
# limitations under the License.
1717

1818
if [ "$LICENSE" = "accept" ]; then
19-
exit 0
19+
exit 0
2020
elif [ "$LICENSE" = "view" ]; then
21-
case "$LANG" in
22-
zh_TW*) LICENSE_FILE=Chinese_TW.txt ;;
23-
zh*) LICENSE_FILE=Chinese.txt ;;
24-
cs*) LICENSE_FILE=Czech.txt ;;
25-
en*) LICENSE_FILE=English.txt ;;
26-
fr*) LICENSE_FILE=French.txt ;;
27-
de*) LICENSE_FILE=German.txt ;;
28-
el*) LICENSE_FILE=Greek.txt ;;
29-
id*) LICENSE_FILE=Indonesian.txt ;;
30-
it*) LICENSE_FILE=Italian.txt ;;
31-
ja*) LICENSE_FILE=Japanese.txt ;;
32-
ko*) LICENSE_FILE=Korean.txt ;;
33-
lt*) LICENSE_FILE=Lithuanian.txt ;;
34-
pl*) LICENSE_FILE=Polish.txt ;;
35-
pt*) LICENSE_FILE=Portuguese.txt ;;
36-
ru*) LICENSE_FILE=Russian.txt ;;
37-
sl*) LICENSE_FILE=Slovenian.txt ;;
38-
es*) LICENSE_FILE=Spanish.txt ;;
39-
tr*) LICENSE_FILE=Turkish.txt ;;
40-
*) LICENSE_FILE=English.txt ;;
41-
esac
42-
cat /opt/mqm/licenses/$LICENSE_FILE
43-
exit 1
21+
case "$LANG" in
22+
zh_TW*) LICENSE_FILE=Chinese_TW.txt ;;
23+
zh*) LICENSE_FILE=Chinese.txt ;;
24+
cs*) LICENSE_FILE=Czech.txt ;;
25+
en*) LICENSE_FILE=English.txt ;;
26+
fr*) LICENSE_FILE=French.txt ;;
27+
de*) LICENSE_FILE=German.txt ;;
28+
el*) LICENSE_FILE=Greek.txt ;;
29+
id*) LICENSE_FILE=Indonesian.txt ;;
30+
it*) LICENSE_FILE=Italian.txt ;;
31+
ja*) LICENSE_FILE=Japanese.txt ;;
32+
ko*) LICENSE_FILE=Korean.txt ;;
33+
lt*) LICENSE_FILE=Lithuanian.txt ;;
34+
pl*) LICENSE_FILE=Polish.txt ;;
35+
pt*) LICENSE_FILE=Portuguese.txt ;;
36+
ru*) LICENSE_FILE=Russian.txt ;;
37+
sl*) LICENSE_FILE=Slovenian.txt ;;
38+
es*) LICENSE_FILE=Spanish.txt ;;
39+
tr*) LICENSE_FILE=Turkish.txt ;;
40+
*) LICENSE_FILE=English.txt ;;
41+
esac
42+
cat /opt/mqm/licenses/$LICENSE_FILE
43+
exit 1
4444
else
45-
echo -e "Set environment variable LICENSE=accept to indicate acceptance of license terms and conditions.\n\nLicense agreements and information can be viewed by running this image with the environment variable LICENSE=view. You can also set the LANG environment variable to view the license in a different language."
46-
exit 1
45+
echo -e "Set environment variable LICENSE=accept to indicate acceptance of license terms and conditions.\n\nLicense agreements and information can be viewed by running this image with the environment variable LICENSE=view. You can also set the LANG environment variable to view the license in a different language."
46+
exit 1
4747
fi

server/mq.sh

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -18,76 +18,76 @@ set -e
1818

1919
stop()
2020
{
21-
endmqm $MQ_QMGR_NAME
21+
endmqm $MQ_QMGR_NAME
2222
}
2323

2424
config()
2525
{
26-
: ${MQ_QMGR_NAME?"ERROR: You need to set the MQ_QMGR_NAME environment variable"}
27-
source /opt/mqm/bin/setmqenv -s
28-
echo "----------------------------------------"
29-
dspmqver
30-
echo "----------------------------------------"
26+
: ${MQ_QMGR_NAME?"ERROR: You need to set the MQ_QMGR_NAME environment variable"}
27+
source /opt/mqm/bin/setmqenv -s
28+
echo "----------------------------------------"
29+
dspmqver
30+
echo "----------------------------------------"
3131

32-
QMGR_EXISTS=`dspmq | grep ${MQ_QMGR_NAME} > /dev/null ; echo $?`
33-
if [ ${QMGR_EXISTS} -ne 0 ]; then
34-
echo "Checking filesystem..."
35-
amqmfsck /var/mqm
36-
echo "----------------------------------------"
37-
crtmqm -q ${MQ_QMGR_NAME} || true
38-
if [ ${MQ_QMGR_CMDLEVEL+x} ]; then
39-
# Enables the specified command level, then stops the queue manager
40-
strmqm -e CMDLEVEL=${MQ_QMGR_CMDLEVEL} || true
41-
fi
42-
echo "----------------------------------------"
43-
fi
44-
strmqm ${MQ_QMGR_NAME}
45-
if [ ${QMGR_EXISTS} -ne 0 ]; then
46-
echo "----------------------------------------"
47-
if [ -f /etc/mqm/listener.mqsc ]; then
48-
runmqsc ${MQ_QMGR_NAME} < /etc/mqm/listener.mqsc
49-
fi
50-
if [ -f /etc/mqm/config.mqsc ]; then
51-
runmqsc ${MQ_QMGR_NAME} < /etc/mqm/config.mqsc
52-
fi
53-
fi
54-
echo "----------------------------------------"
32+
QMGR_EXISTS=`dspmq | grep ${MQ_QMGR_NAME} > /dev/null ; echo $?`
33+
if [ ${QMGR_EXISTS} -ne 0 ]; then
34+
echo "Checking filesystem..."
35+
amqmfsck /var/mqm
36+
echo "----------------------------------------"
37+
crtmqm -q ${MQ_QMGR_NAME} || true
38+
if [ ${MQ_QMGR_CMDLEVEL+x} ]; then
39+
# Enables the specified command level, then stops the queue manager
40+
strmqm -e CMDLEVEL=${MQ_QMGR_CMDLEVEL} || true
41+
fi
42+
echo "----------------------------------------"
43+
fi
44+
strmqm ${MQ_QMGR_NAME}
45+
if [ ${QMGR_EXISTS} -ne 0 ]; then
46+
echo "----------------------------------------"
47+
if [ -f /etc/mqm/listener.mqsc ]; then
48+
runmqsc ${MQ_QMGR_NAME} < /etc/mqm/listener.mqsc
49+
fi
50+
if [ -f /etc/mqm/config.mqsc ]; then
51+
runmqsc ${MQ_QMGR_NAME} < /etc/mqm/config.mqsc
52+
fi
53+
fi
54+
echo "----------------------------------------"
5555
}
5656

5757
state()
5858
{
59-
dspmq -n -m ${MQ_QMGR_NAME} | awk -F '[()]' '{ print $4 }'
59+
dspmq -n -m ${MQ_QMGR_NAME} | awk -F '[()]' '{ print $4 }'
6060
}
6161

6262
monitor()
6363
{
64-
# Loop until "dspmq" says the queue manager is running
65-
until [ "`state`" == "RUNNING" ]; do
66-
sleep 1
67-
done
68-
dspmq
64+
# Loop until "dspmq" says the queue manager is running
65+
until [ "`state`" == "RUNNING" ]; do
66+
sleep 1
67+
done
68+
dspmq
6969

70-
# Loop until "dspmq" says the queue manager is not running any more
71-
until [ "`state`" != "RUNNING" ]; do
72-
sleep 5
73-
done
70+
# Loop until "dspmq" says the queue manager is not running any more
71+
until [ "`state`" != "RUNNING" ]; do
72+
sleep 5
73+
done
7474

75-
# Wait until queue manager has ended before exiting
76-
while true; do
77-
STATE=`state`
78-
case "$STATE" in
79-
ENDED*) break;;
80-
*) ;;
81-
esac
82-
sleep 1
83-
done
84-
dspmq
75+
# Wait until queue manager has ended before exiting
76+
while true; do
77+
STATE=`state`
78+
case "$STATE" in
79+
ENDED*) break;;
80+
*) ;;
81+
esac
82+
sleep 1
83+
done
84+
dspmq
8585
}
8686

8787
mq-license-check.sh
8888
# If /var/mqm is empty (because it's mounted from a new host volume), then populate it
8989
if [ ! "$(ls -A /var/mqm)" ]; then
90-
/opt/mqm/bin/amqicdir -i -f
90+
/opt/mqm/bin/amqicdir -i -f
9191
fi
9292
config
9393
trap stop SIGTERM SIGINT

0 commit comments

Comments
 (0)