-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpack.sh
57 lines (47 loc) · 1.42 KB
/
pack.sh
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
#!/bin/bash
svn up
date=`date +"2019%m%d"`
svn=`svn info | grep "Last Changed Rev:" | cut -d " " -f 4`
dir="pack-xpm-$date-$svn-java"
tgz="$dir.tar.gz"
sh="$dir.sh"
rm pack-xpm* -r
mkdir $dir
cp ROOT.war $dir
cp doc/*.sql $dir
tar -zcvf $tgz $dir
echo "#!/bin/bash
source /usr/local/var/chkdef.sh
export LANG=en_US.UTF-8
export JAVA_HOME=/opt/jdk1.8.0_131/
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export LD_LIBRARY_PATH=/usr/lib:/usr/local/lib:/lib
tail -n +36 \$0 > /opt/$tgz
cd /opt
tar -zxvf $tgz
cd $dir
cp *.sql /usr/local/var
crontab -r;
killall java -9;
/usr/local/var/chkxpm.sh kill
mysql -uroot -p123456 ipm < ipm_table.sql
mysql -uroot -p123456 ipm < ipm_data.sql
mysql -uroot -p123456 ipm < ip_cn.sql
mysql -uroot -p123456 ipm < ipm_proto_plan.sql
mysql -uroot -p123456 ipm < ipm_public_proto_plan.sql
mv \$sysinfo /data/; mv \$sysset /data/
rm -r /opt/apache-tomcat-8.0.45/webapps/ROOT*
cp ROOT.war /opt/apache-tomcat-8.0.45/webapps/
crontab /usr/local/var/monitor.cron
while [ ! -f \"\$sysinfo\" -o ! -f \"\$sysset\" ]; do
echo wait for $sysinfo and $sysset to uncompress ... >> /usr/local/var/monitor.log
sleep 5
done
mv -f /data/sysset.properties \$sysset
mv -f /data/sysinfo.properties \$sysinfo
chklicense -r \"iPilot-XPM-6.0.$svn\"
exit" > $sh
cat $tgz >> $sh
chmod +x *.sh
#./src/main/java/com/protocolsoft/system/service/impl/SystemSetServiceImpl.java:223: