-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunNonStop.sh
More file actions
executable file
·36 lines (29 loc) · 914 Bytes
/
runNonStop.sh
File metadata and controls
executable file
·36 lines (29 loc) · 914 Bytes
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
#!/bin/sh
echo "Start .."
PATH_PROG=.
PATH_PROG=./target
PATH_LOG=$PATH_PROG/log
LOG_CONF=$PATH_PROG/properties/logging.properties
VMparam="-server -Xms256m -Xmx256m"
#VMparam="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -Xloggc:$PATH_LOG/gc-prog-01.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=11 -XX:GCLogFileSize=12M $VMparam"
#VMparam="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=6101 $VMparam"
VMparam="-Djava.util.logging.config.file=$LOG_CONF $VMparam"
VMparam="-Dapp.path.config=./properties $VMparam"
echo "Start .." > runNonStop.log
date >> runNonStop.log
while true
do
nice -15 java $VMparam -jar $PATH_PROG/mailConsumer-1.0.3.jar -v
## Check result .. ##
if [ $? -eq 0 ]
then
echo "Run = Success: continue to process .."
else
echo "Failure: .." >&2
exit $?
fi
sleep 11
done
echo "--"
echo "End of script!"
exit 0