Skip to content

Commit e822fef

Browse files
committed
v3.2.0
v3.2.0
1 parent 6416847 commit e822fef

File tree

578 files changed

+4429
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

578 files changed

+4429
-0
lines changed
Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,120 @@
1+
#!/bin/bash
2+
# author wy_ctl
3+
# ./wy_ctl.sh start 启动
4+
# ./wy_ctl.sh stop 停止
5+
# ./wy_ctl.sh restart 重启
6+
# ./wy_ctl.sh status 状态
7+
AppName=/usr/local/mulin/app/mulin-cost.jar
8+
# 服务器地址
9+
# IP=0.0.0.0
10+
11+
# mysql 数据库用户名
12+
DbServ=mulin_db
13+
DbName=mulin_cost
14+
DbUserName=root
15+
DbPassword=YWBeMERL
16+
17+
#Redis
18+
RedisServ=mulin_redis
19+
RedisPort=6379
20+
RedisPwd=password
21+
22+
# 文件存储路径
23+
FilePath=/usr/local/mulin/uploads
24+
# JVM参数
25+
JVM_OPTS="-Dname=$AppName -Duser.timezone=Asia/Shanghai -Xms512M -Xmx512M
26+
-XX:PermSize=256M -XX:MaxPermSize=512M -XX:+HeapDumpOnOutOfMemoryError
27+
-XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:NewRatio=1 -XX:SurvivorRatio=30
28+
-XX:+UseParallelGC -XX:+UseParallelOldGC -Dfile.encoding=utf-8 -Dsun.jnu.encoding=UTF-8"
29+
DB_OPTS="--spring.datasource.druid.master.url=jdbc:mysql://$DbServ:3306/$DbName?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
30+
--spring.datasource.druid.master.username=$DbUserName --spring.datasource.druid.master.password=$DbPassword"
31+
Redis_OPTS="--spring.redis.host=$RedisServ --spring.redis.port=$RedisPort
32+
--spring.redis.password=$RedisPwd"
33+
34+
APP_OPTS="--ruoyi.profile=$FilePath "
35+
36+
APP_HOME=/usr/local/mulin/
37+
LOG_PATH=/usr/local/mulin/logs/$AppName.log
38+
39+
if [ "$1" = "" ];
40+
then
41+
echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m"
42+
exit 1
43+
fi
44+
45+
if [ "$AppName" = "" ];
46+
then
47+
echo -e "\033[0;31m 未输入应用名 \033[0m"
48+
exit 1
49+
fi
50+
51+
function start()
52+
{
53+
PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
54+
55+
if [ x"$PID" != x"" ]; then
56+
echo "$AppName is running..."
57+
else
58+
nohup java -jar $AppName $JVM_OPTS $DB_OPTS $Redis_OPTS $APP_OPTS >> $APP_HOME/logs/server.log 2>&1 &
59+
60+
61+
echo "Start $AppName success..."
62+
fi
63+
}
64+
65+
function stop()
66+
{
67+
echo "Stop $AppName"
68+
69+
PID=""
70+
query(){
71+
PID=`ps -ef |grep java|grep $AppName|grep -v grep|awk '{print $2}'`
72+
}
73+
74+
query
75+
if [ x"$PID" != x"" ]; then
76+
kill -TERM $PID
77+
echo "$AppName (pid:$PID) exiting..."
78+
while [ x"$PID" != x"" ]
79+
do
80+
sleep 1
81+
query
82+
done
83+
echo "$AppName exited."
84+
else
85+
echo "$AppName already stopped."
86+
fi
87+
}
88+
89+
function restart()
90+
{
91+
stop
92+
sleep 2
93+
start
94+
}
95+
96+
function status()
97+
{
98+
PID=`ps -ef |grep java|grep $AppName|grep -v grep|wc -l`
99+
if [ $PID != 0 ];then
100+
echo "$AppName is running..."
101+
else
102+
echo "$AppName is not running..."
103+
fi
104+
}
105+
106+
case $1 in
107+
start)
108+
start;;
109+
stop)
110+
stop;;
111+
restart)
112+
restart;;
113+
status)
114+
status;;
115+
*)
116+
117+
esac
118+
119+
120+
tail -f /dev/null
85.4 MB
Binary file not shown.

install/mulin3.2.0/compose/conf/app/mulin-cost.jar.txt

Whitespace-only changes.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/bin/bash
2+
chmod +x /usr/local/mulin/app/mulin-cost.jar
3+
/usr/local/mulin/app/ctl-tools.sh start
4+
tail -f /dev/null
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
#!/usr/bin/env bash
2+
# Use this script to test if a given TCP host/port are available
3+
4+
WAITFORIT_cmdname=${0##*/}
5+
6+
echoerr() { if [[ $WAITFORIT_QUIET -ne 1 ]]; then echo "$@" 1>&2; fi }
7+
8+
usage()
9+
{
10+
cat << USAGE >&2
11+
Usage:
12+
$WAITFORIT_cmdname host:port [-s] [-t timeout] [-- command args]
13+
-h HOST | --host=HOST Host or IP under test
14+
-p PORT | --port=PORT TCP port under test
15+
Alternatively, you specify the host and port as host:port
16+
-s | --strict Only execute subcommand if the test succeeds
17+
-q | --quiet Don't output any status messages
18+
-t TIMEOUT | --timeout=TIMEOUT
19+
Timeout in seconds, zero for no timeout
20+
-- COMMAND ARGS Execute command with args after the test finishes
21+
USAGE
22+
exit 1
23+
}
24+
25+
wait_for()
26+
{
27+
if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
28+
echoerr "$WAITFORIT_cmdname: waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
29+
else
30+
echoerr "$WAITFORIT_cmdname: waiting for $WAITFORIT_HOST:$WAITFORIT_PORT without a timeout"
31+
fi
32+
WAITFORIT_start_ts=$(date +%s)
33+
while :
34+
do
35+
if [[ $WAITFORIT_ISBUSY -eq 1 ]]; then
36+
nc -z $WAITFORIT_HOST $WAITFORIT_PORT
37+
WAITFORIT_result=$?
38+
else
39+
(echo -n > /dev/tcp/$WAITFORIT_HOST/$WAITFORIT_PORT) >/dev/null 2>&1
40+
WAITFORIT_result=$?
41+
fi
42+
if [[ $WAITFORIT_result -eq 0 ]]; then
43+
WAITFORIT_end_ts=$(date +%s)
44+
echoerr "$WAITFORIT_cmdname: $WAITFORIT_HOST:$WAITFORIT_PORT is available after $((WAITFORIT_end_ts - WAITFORIT_start_ts)) seconds"
45+
break
46+
fi
47+
sleep 1
48+
done
49+
return $WAITFORIT_result
50+
}
51+
52+
wait_for_wrapper()
53+
{
54+
# In order to support SIGINT during timeout: http://unix.stackexchange.com/a/57692
55+
if [[ $WAITFORIT_QUIET -eq 1 ]]; then
56+
timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --quiet --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT &
57+
else
58+
timeout $WAITFORIT_BUSYTIMEFLAG $WAITFORIT_TIMEOUT $0 --child --host=$WAITFORIT_HOST --port=$WAITFORIT_PORT --timeout=$WAITFORIT_TIMEOUT &
59+
fi
60+
WAITFORIT_PID=$!
61+
trap "kill -INT -$WAITFORIT_PID" INT
62+
wait $WAITFORIT_PID
63+
WAITFORIT_RESULT=$?
64+
if [[ $WAITFORIT_RESULT -ne 0 ]]; then
65+
echoerr "$WAITFORIT_cmdname: timeout occurred after waiting $WAITFORIT_TIMEOUT seconds for $WAITFORIT_HOST:$WAITFORIT_PORT"
66+
fi
67+
return $WAITFORIT_RESULT
68+
}
69+
70+
# process arguments
71+
while [[ $# -gt 0 ]]
72+
do
73+
case "$1" in
74+
*:* )
75+
WAITFORIT_hostport=(${1//:/ })
76+
WAITFORIT_HOST=${WAITFORIT_hostport[0]}
77+
WAITFORIT_PORT=${WAITFORIT_hostport[1]}
78+
shift 1
79+
;;
80+
--child)
81+
WAITFORIT_CHILD=1
82+
shift 1
83+
;;
84+
-q | --quiet)
85+
WAITFORIT_QUIET=1
86+
shift 1
87+
;;
88+
-s | --strict)
89+
WAITFORIT_STRICT=1
90+
shift 1
91+
;;
92+
-h)
93+
WAITFORIT_HOST="$2"
94+
if [[ $WAITFORIT_HOST == "" ]]; then break; fi
95+
shift 2
96+
;;
97+
--host=*)
98+
WAITFORIT_HOST="${1#*=}"
99+
shift 1
100+
;;
101+
-p)
102+
WAITFORIT_PORT="$2"
103+
if [[ $WAITFORIT_PORT == "" ]]; then break; fi
104+
shift 2
105+
;;
106+
--port=*)
107+
WAITFORIT_PORT="${1#*=}"
108+
shift 1
109+
;;
110+
-t)
111+
WAITFORIT_TIMEOUT="$2"
112+
if [[ $WAITFORIT_TIMEOUT == "" ]]; then break; fi
113+
shift 2
114+
;;
115+
--timeout=*)
116+
WAITFORIT_TIMEOUT="${1#*=}"
117+
shift 1
118+
;;
119+
--)
120+
shift
121+
WAITFORIT_CLI=("$@")
122+
break
123+
;;
124+
--help)
125+
usage
126+
;;
127+
*)
128+
echoerr "Unknown argument: $1"
129+
usage
130+
;;
131+
esac
132+
done
133+
134+
if [[ "$WAITFORIT_HOST" == "" || "$WAITFORIT_PORT" == "" ]]; then
135+
echoerr "Error: you need to provide a host and port to test."
136+
usage
137+
fi
138+
139+
WAITFORIT_TIMEOUT=${WAITFORIT_TIMEOUT:-15}
140+
WAITFORIT_STRICT=${WAITFORIT_STRICT:-0}
141+
WAITFORIT_CHILD=${WAITFORIT_CHILD:-0}
142+
WAITFORIT_QUIET=${WAITFORIT_QUIET:-0}
143+
144+
# Check to see if timeout is from busybox?
145+
WAITFORIT_TIMEOUT_PATH=$(type -p timeout)
146+
WAITFORIT_TIMEOUT_PATH=$(realpath $WAITFORIT_TIMEOUT_PATH 2>/dev/null || readlink -f $WAITFORIT_TIMEOUT_PATH)
147+
148+
WAITFORIT_BUSYTIMEFLAG=""
149+
if [[ $WAITFORIT_TIMEOUT_PATH =~ "busybox" ]]; then
150+
WAITFORIT_ISBUSY=1
151+
# Check if busybox timeout uses -t flag
152+
# (recent Alpine versions don't support -t anymore)
153+
if timeout &>/dev/stdout | grep -q -e '-t '; then
154+
WAITFORIT_BUSYTIMEFLAG="-t"
155+
fi
156+
else
157+
WAITFORIT_ISBUSY=0
158+
fi
159+
160+
if [[ $WAITFORIT_CHILD -gt 0 ]]; then
161+
wait_for
162+
WAITFORIT_RESULT=$?
163+
exit $WAITFORIT_RESULT
164+
else
165+
if [[ $WAITFORIT_TIMEOUT -gt 0 ]]; then
166+
wait_for_wrapper
167+
WAITFORIT_RESULT=$?
168+
else
169+
wait_for
170+
WAITFORIT_RESULT=$?
171+
fi
172+
fi
173+
174+
if [[ $WAITFORIT_CLI != "" ]]; then
175+
if [[ $WAITFORIT_RESULT -ne 0 && $WAITFORIT_STRICT -eq 1 ]]; then
176+
echoerr "$WAITFORIT_cmdname: strict mode, refusing to execute subprocess"
177+
exit $WAITFORIT_RESULT
178+
fi
179+
exec "${WAITFORIT_CLI[@]}"
180+
else
181+
exit $WAITFORIT_RESULT
182+
fi
4.19 KB
Binary file not shown.

install/mulin3.2.0/compose/conf/html/html/ie.html

Lines changed: 46 additions & 0 deletions
Large diffs are not rendered by default.
16.9 KB
Binary file not shown.

install/mulin3.2.0/compose/conf/html/html/js-sdk-pro.min.js

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
12.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)