瀏覽代碼

更新脚本

jyyw 1 年之前
父節點
當前提交
22a2d98198
共有 38 個文件被更改,包括 484 次插入285 次删除
  1. 1 1
      ipfcst-console/pom.xml
  2. 1 1
      ipfcst-spare2/pom.xml
  3. 0 50
      syjy/ipfcstV3/bin/install-ipfcst-centos.sh
  4. 0 35
      syjy/ipfcstV3/bin/install-ipfcst-linx.sh
  5. 84 0
      syjy/ipfcstV3/bin/install-ipfcst-v3.sh
  6. 12 0
      syjy/ipfcstV3/bin/monitor-spare2.sh
  7. 0 0
      syjy/ipfcstV3/bin/restart-console.sh
  8. 0 0
      syjy/ipfcstV3/bin/restart-monitor.sh
  9. 0 0
      syjy/ipfcstV3/bin/restart-reportquery.sh
  10. 9 0
      syjy/ipfcstV3/bin/restart-spare2.sh
  11. 9 0
      syjy/ipfcstV3/bin/restart-upload.sh
  12. 5 5
      syjy/ipfcstV3/bin/start-console.sh
  13. 4 6
      syjy/ipfcstV3/bin/start-monitor.sh
  14. 4 6
      syjy/ipfcstV3/bin/start-reportquery.sh
  15. 30 0
      syjy/ipfcstV3/bin/start-spare2.sh
  16. 30 0
      syjy/ipfcstV3/bin/start-upload.sh
  17. 10 10
      syjy/ipfcstV3/bin/status-console.sh
  18. 10 10
      syjy/ipfcstV3/bin/status-monitor.sh
  19. 10 10
      syjy/ipfcstV3/bin/status-reportquery.sh
  20. 16 0
      syjy/ipfcstV3/bin/status-spare2.sh
  21. 16 0
      syjy/ipfcstV3/bin/status-upload.sh
  22. 7 8
      syjy/ipfcstV3/bin/stop-console.sh
  23. 7 8
      syjy/ipfcstV3/bin/stop-monitor.sh
  24. 7 8
      syjy/ipfcstV3/bin/stop-reportquery.sh
  25. 16 0
      syjy/ipfcstV3/bin/stop-spare2.sh
  26. 16 0
      syjy/ipfcstV3/bin/stop-upload.sh
  27. 1 1
      syjy/ipfcstV3/bin/update-console.sh
  28. 1 1
      syjy/ipfcstV3/bin/update-lib.sh
  29. 1 1
      syjy/ipfcstV3/bin/update-monitor.sh
  30. 1 1
      syjy/ipfcstV3/bin/update-reportquery.sh
  31. 10 0
      syjy/ipfcstV3/bin/update-spare2.sh
  32. 10 0
      syjy/ipfcstV3/bin/update-upload.sh
  33. 50 39
      syjy/ipfcstV3/settings/console
  34. 2 2
      syjy/ipfcstV3/settings/console.service
  35. 50 39
      syjy/ipfcstV3/settings/monitor
  36. 2 2
      syjy/ipfcstV3/settings/monitor.service
  37. 50 39
      syjy/ipfcstV3/settings/reportquery
  38. 2 2
      syjy/ipfcstV3/settings/reportquery.service

+ 1 - 1
ipfcst-console/pom.xml

@@ -233,7 +233,7 @@
     <dependency>
       <groupId>com.syjy</groupId>
       <artifactId>calculation-spring-boot-starter</artifactId>
-      <version>0.0.28</version>
+      <version>0.0.29</version>
 
       <exclusions>
         <exclusion>

+ 1 - 1
ipfcst-spare2/pom.xml

@@ -211,7 +211,7 @@
         <dependency>
             <groupId>com.syjy</groupId>
             <artifactId>calculation-spring-boot-starter</artifactId>
-            <version>0.0.28</version>
+            <version>0.0.29</version>
 
             <exclusions>
                 <exclusion>

+ 0 - 50
syjy/ipfcstV3/bin/install-ipfcst-centos.sh

@@ -1,50 +0,0 @@
-#!/bin/sh
-
-export basedir=/home/syjy/ipfcstV3
-
-chmod -R 777 $basedir
-
-cd $basedir/jdk
-
-tar -zxvf jdk-8u261-linux-x64.tar.gz
-
-if test -e /home/syjy/patch.zip
-	then
-	cd /home/syjy
-	unzip -o patch.zip
-fi
-
-cp -f $basedir/settings/monitor /etc/init.d/
-cp -f $basedir/settings/console /etc/init.d/
-cp -f $basedir/settings/reportquery /etc/init.d/
-
-chmod 777 /etc/init.d/monitor
-chmod 777 /etc/init.d/console
-chmod 777 /etc/init.d/reportquery
-
-if test -x /usr/lib/systemd/system
-	then
-	cp -f $basedir/settings/monitor.service /usr/lib/systemd/system
-	cp -f $basedir/settings/console.service /usr/lib/systemd/system
-	cp -f $basedir/settings/reportquery.service /usr/lib/systemd/system
-	
-	chmod 777 /usr/lib/systemd/system/monitor.service
-	chmod 777 /usr/lib/systemd/system/console.service
-	chmod 777 /usr/lib/systemd/system/reportquery.service
-	
-	systemctl daemon-reload
-	systemctl enable monitor
-	systemctl enable console
-	systemctl enable reportquery
-	
-	else
-	chkconfig monitor on
-	chkconfig console on
-	chkconfig reportquery on
-fi
-
-service monitor start
-service console start
-service reportquery start
-
-echo "Installation is complete!"

+ 0 - 35
syjy/ipfcstV3/bin/install-ipfcst-linx.sh

@@ -1,35 +0,0 @@
-#!/bin/sh
-
-export basedir=/home/syjy/ipfcstV3
-
-chmod -R 777 $basedir
-
-cd $basedir/jdk
-
-echo "Install jdk8!"
-tar -zxvf jdk-8u261-linux-x64.tar.gz
-
-if test -e /home/syjy/patch.zip
-	then
-	cd /home/syjy
-	unzip -o patch.zip
-fi
-
-cp -f $basedir/settings/monitor /etc/init.d/
-cp -f $basedir/settings/console /etc/init.d/
-cp -f $basedir/settings/reportquery /etc/init.d/
-
-chmod 777 /etc/init.d/monitor
-chmod 777 /etc/init.d/console
-chmod 777 /etc/init.d/reportquery
-
-update-rc.d monitor defaults
-update-rc.d console defaults
-update-rc.d reportquery defaults
-systemctl daemon-reload
-
-service monitor start
-service console start
-service reportquery start
-
-echo "Installation is complete!"

+ 84 - 0
syjy/ipfcstV3/bin/install-ipfcst-v3.sh

@@ -0,0 +1,84 @@
+#!/bin/sh
+
+export basedir=/home/syjy/ipfcstV3
+
+chmod 777 $basedir/*
+chmod -R 777 $basedir/bin
+chmod -R 777 $basedir/settings
+chmod -R 777 $basedir/jdk
+chmod -R 777 $basedir/produce
+
+cd $basedir/jdk
+
+echo "Install jdk8!"
+tar -zxvf jdk-8u261-linux-x64.tar.gz
+
+if test -e /home/syjy/patch.zip; then
+	cd /home/syjy
+	unzip -o patch.zip
+fi
+
+if test -x /usr/lib/systemd/system; then
+	cp -f $basedir/settings/monitor.service /usr/lib/systemd/system
+	cp -f $basedir/settings/console.service /usr/lib/systemd/system
+	cp -f $basedir/settings/reportquery.service /usr/lib/systemd/system
+
+	chmod 777 /usr/lib/systemd/system/monitor.service
+	chmod 777 /usr/lib/systemd/system/console.service
+	chmod 777 /usr/lib/systemd/system/reportquery.service
+
+fi
+
+if test -x /lib/systemd/system; then
+	cp -f $basedir/settings/monitor.service /lib/systemd/system
+	cp -f $basedir/settings/console.service /lib/systemd/system
+	cp -f $basedir/settings/reportquery.service /lib/systemd/system
+
+	chmod 777 /lib/systemd/system/monitor.service
+	chmod 777 /lib/systemd/system/console.service
+	chmod 777 /lib/systemd/system/reportquery.service
+fi
+
+if test -x /etc/init.d; then
+	cp -f $basedir/settings/monitor /etc/init.d/
+	cp -f $basedir/settings/console /etc/init.d/
+	cp -f $basedir/settings/reportquery /etc/init.d/
+
+	chmod 777 /etc/init.d/monitor
+	chmod 777 /etc/init.d/console
+	chmod 777 /etc/init.d/reportquery
+fi
+
+if [[ -n $(systemctl --version 2>/dev/null | grep systemd) ]]; then
+	echo "initialize systemd"
+	systemctl daemon-reload
+	systemctl enable monitor
+	systemctl enable console
+	systemctl enable reportquery
+
+	systemctl list-unit-files --type=service | egrep "^console\.|^monitor\.|^reportquery\."
+
+	systemctl restart monitor
+	systemctl restart console
+	systemctl restart reportquery
+
+else
+	echo "initialize sysV"
+	if [[ -n $(chkconfig --version 2>/dev/null) ]]; then
+		chkconfig monitor on
+		chkconfig console on
+		chkconfig reportquery on
+		chkconfig --list | egrep "^console\s|^monitor\s|^reportquery\s"
+	else
+		update-rc.d monitor defaults
+		update-rc.d console defaults
+		update-rc.d reportquery defaults
+	fi
+
+	service monitor restart
+	service console restart
+	service reportquery restart
+
+fi
+
+echo "Installation is complete!"

+ 12 - 0
syjy/ipfcstV3/bin/monitor-spare2.sh

@@ -0,0 +1,12 @@
+#!/bin/sh
+# v0.0.1
+
+pid_list=$(ps aux | grep ipfcst-spare2 | grep -v grep | awk '{print $2}' | tr -d '\n')
+
+if [[ -z "${pid_list}" ]]; then
+	export basedir=/home/syjy/ipfcstV3
+	export bindir=$basedir/bin
+	sh $bindir/start-spare2.sh
+fi
+
+exit 0

+ 0 - 0
syjy/ipfcstV3/bin/restart-console.sh


+ 0 - 0
syjy/ipfcstV3/bin/restart-monitor.sh


+ 0 - 0
syjy/ipfcstV3/bin/restart-reportquery.sh


+ 9 - 0
syjy/ipfcstV3/bin/restart-spare2.sh

@@ -0,0 +1,9 @@
+#!/bin/sh
+
+export basedir=/home/syjy/ipfcstV3
+export bindir=$basedir/bin
+
+sh $bindir/stop-spare2.sh
+sh $bindir/start-spare2.sh
+
+exit 0

+ 9 - 0
syjy/ipfcstV3/bin/restart-upload.sh

@@ -0,0 +1,9 @@
+#!/bin/sh
+
+export basedir=/home/syjy/ipfcstV3
+export bindir=$basedir/bin
+
+sh $bindir/stop-spare2.sh
+sh $bindir/start-spare2.sh
+
+exit 0

+ 5 - 5
syjy/ipfcstV3/bin/start-console.sh

@@ -5,9 +5,9 @@ export producedir=$basedir/produce
 
 export start_app_log=$basedir/logs/ipfcst_console.log
 
-export version="3.1.772.zjtest"
+export version="3.1.764.m.ncdq"
 
-export app_path=$producedir/console/3.1.772.zjtest
+export app_path=$producedir/console/$version
 
 export JAVA_HOME=/home/syjy/ipfcstV3/jdk/jdk1.8.0_261
 export JRE_HOME=$JAVA_HOME/jre
@@ -19,11 +19,11 @@ export LC_ALL="zh_CN.UTF-8"
 
 cd $app_path
 echo "Starting console"
-if test -x $app_path/ipfcst-console.jar
-  then
+ulimit -n 65535
+if test -x $app_path/ipfcst-console.jar; then
 	java -jar $app_path/ipfcst-console.jar >$start_app_log &
 	echo "console started, PID is $!" | sed -e "s/\b\(.\)/\u\1/g"
-  else
+else
 	echo "Couldn't find console server($app_path/ipfcst-console.jar)"
 fi
 

+ 4 - 6
syjy/ipfcstV3/bin/start-monitor.sh

@@ -5,7 +5,7 @@ export producedir=$basedir/produce
 
 export start_app_log=$basedir/logs/ipfcst_monitor.log
 
-export version="1.0.35"
+export version="1.0.36"
 
 export app_path=$producedir/monitor/$version
 
@@ -16,16 +16,14 @@ export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
 
 cd $app_path
 echo "Starting monitor"
-if test -r $basedir/settings/application.yml
-  then
+if test -r $basedir/settings/application.yml; then
 	cp -f $basedir/settings/application.yml $app_path/
 	echo "cp $basedir/settings/application.yml $app_path/"
 fi
-if test -x $app_path/ipfcst-monitor.jar
-  then
+if test -x $app_path/ipfcst-monitor.jar; then
 	java -jar $app_path/ipfcst-monitor.jar >$start_app_log &
 	echo "monitor started, PID is $!" | sed -e "s/\b\(.\)/\u\1/g"
-  else
+else
 	echo "Couldn't find monitor server($app_path/ipfcst-monitor.jar)"
 fi
 

+ 4 - 6
syjy/ipfcstV3/bin/start-reportquery.sh

@@ -5,9 +5,9 @@ export producedir=$basedir/produce
 
 export start_app_log=$basedir/logs/ipfcst_reportquery.log
 
-export version="3.1.344.m"
+export version="3.1.345.m.ncdq"
 
-export app_path=$producedir/reportquery/3.1.344.m
+export app_path=$producedir/reportquery/$version
 
 export JAVA_HOME=/home/syjy/ipfcstV3/jdk/jdk1.8.0_261
 export JRE_HOME=$JAVA_HOME/jre
@@ -17,14 +17,12 @@ export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
 export LANG="zh_CN.UTF-8"
 export LC_ALL="zh_CN.UTF-8"
 
-
 cd $app_path
 echo "Starting reportquery"
-if test -x $app_path/ipfcst-reportquery.jar
-  then
+if test -x $app_path/ipfcst-reportquery.jar; then
 	java -jar $app_path/ipfcst-reportquery.jar >$start_app_log &
 	echo "reportquery started, PID is $!" | sed -e "s/\b\(.\)/\u\1/g"
-  else
+else
 	echo "Couldn't find reportquery server($app_path/ipfcst-reportquery.jar)"
 fi
 

+ 30 - 0
syjy/ipfcstV3/bin/start-spare2.sh

@@ -0,0 +1,30 @@
+#!/bin/sh
+
+export basedir=/home/syjy/ipfcstV3
+export producedir=$basedir/produce
+
+export start_app_log=$basedir/logs/ipfcst_spare2.log
+
+export version="0.0.1.m"
+
+export app_path=$producedir/spare2/$version
+
+export JAVA_HOME=/home/syjy/ipfcstV3/jdk/jdk1.8.0_261
+export JRE_HOME=$JAVA_HOME/jre
+export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
+export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
+
+export LANG="zh_CN.UTF-8"
+export LC_ALL="zh_CN.UTF-8"
+
+cd $app_path
+echo "Starting spare2"
+ulimit -n 65535
+if test -x $app_path/ipfcst-spare2.jar; then
+	java -jar $app_path/ipfcst-spare2.jar >$start_app_log &
+	echo "spare2 started, PID is $!" | sed -e "s/\b\(.\)/\u\1/g"
+else
+	echo "Couldn't find spare2 server($app_path/ipfcst-spare2.jar)"
+fi
+
+exit 0

+ 30 - 0
syjy/ipfcstV3/bin/start-upload.sh

@@ -0,0 +1,30 @@
+#!/bin/sh
+
+export basedir=/home/syjy/ipfcstV3
+export producedir=$basedir/produce
+
+export start_app_log=$basedir/logs/ipfcst_spare2.log
+
+export version="0.0.1.m"
+
+export app_path=$producedir/spare2/$version
+
+export JAVA_HOME=/home/syjy/ipfcstV3/jdk/jdk1.8.0_261
+export JRE_HOME=$JAVA_HOME/jre
+export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH
+export PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
+
+export LANG="zh_CN.UTF-8"
+export LC_ALL="zh_CN.UTF-8"
+
+cd $app_path
+echo "Starting spare2"
+ulimit -n 65535
+if test -x $app_path/ipfcst-spare2.jar; then
+	java -jar $app_path/ipfcst-spare2.jar >$start_app_log &
+	echo "spare2 started, PID is $!" | sed -e "s/\b\(.\)/\u\1/g"
+else
+	echo "Couldn't find spare2 server($app_path/ipfcst-spare2.jar)"
+fi
+
+exit 0

+ 10 - 10
syjy/ipfcstV3/bin/status-console.sh

@@ -1,16 +1,16 @@
 #!/bin/sh
 
 pid_list="$(ps aux | grep ipfcst-console | grep -v grep | awk '{print $2}')"
-pid_count=`echo $pid_list | wc -w`
-if test $pid_count -eq 1 ; then
-  echo "console running, pid is $pid_list"
-  exit 0
-elif test $pid_count -gt 1 ; then
-  echo "Multiple console running $pid_list"
-  exit 1
-elif test -z $pid_list ; then
-  echo "console is not running"
-  exit 1
+pid_count=$(echo $pid_list | wc -w)
+if test $pid_count -eq 1; then
+	echo "console running, pid is $pid_list"
+	exit 0
+elif test $pid_count -gt 1; then
+	echo "Multiple console running $pid_list"
+	exit 1
+elif test -z $pid_list; then
+	echo "console is not running"
+	exit 1
 fi
 
 exit 0

+ 10 - 10
syjy/ipfcstV3/bin/status-monitor.sh

@@ -1,16 +1,16 @@
 #!/bin/sh
 
 pid_list="$(ps aux | grep ipfcst-monitor | grep -v grep | awk '{print $2}')"
-pid_count=`echo $pid_list | wc -w`
-if test $pid_count -eq 1 ; then
-  echo "Monitor running, pid is $pid_list"
-  exit 0
-elif test $pid_count -gt 1 ; then
-  echo "Multiple Monitor running $pid_list"
-  exit 1
-elif test -z $pid_list ; then
-  echo "Monitor is not running"
-  exit 1
+pid_count=$(echo $pid_list | wc -w)
+if test $pid_count -eq 1; then
+	echo "Monitor running, pid is $pid_list"
+	exit 0
+elif test $pid_count -gt 1; then
+	echo "Multiple Monitor running $pid_list"
+	exit 1
+elif test -z $pid_list; then
+	echo "Monitor is not running"
+	exit 1
 fi
 
 exit 0

+ 10 - 10
syjy/ipfcstV3/bin/status-reportquery.sh

@@ -1,16 +1,16 @@
 #!/bin/sh
 
 pid_list="$(ps aux | grep ipfcst-reportquery | grep -v grep | awk '{print $2}')"
-pid_count=`echo $pid_list | wc -w`
-if test $pid_count -eq 1 ; then
-  echo "reportquery running, pid is $pid_list"
-  exit 0
-elif test $pid_count -gt 1 ; then
-  echo "Multiple reportquery running $pid_list"
-  exit 1
-elif test -z $pid_list ; then
-  echo "reportquery is not running"
-  exit 1
+pid_count=$(echo $pid_list | wc -w)
+if test $pid_count -eq 1; then
+	echo "reportquery running, pid is $pid_list"
+	exit 0
+elif test $pid_count -gt 1; then
+	echo "Multiple reportquery running $pid_list"
+	exit 1
+elif test -z $pid_list; then
+	echo "reportquery is not running"
+	exit 1
 fi
 
 exit 0

+ 16 - 0
syjy/ipfcstV3/bin/status-spare2.sh

@@ -0,0 +1,16 @@
+#!/bin/sh
+
+pid_list="$(ps aux | grep ipfcst-spare2 | grep -v grep | awk '{print $2}')"
+pid_count=$(echo $pid_list | wc -w)
+if test $pid_count -eq 1; then
+	echo "spare2 running, pid is $pid_list"
+	exit 0
+elif test $pid_count -gt 1; then
+	echo "Multiple spare2 running $pid_list"
+	exit 1
+elif test -z $pid_list; then
+	echo "spare2 is not running"
+	exit 1
+fi
+
+exit 0

+ 16 - 0
syjy/ipfcstV3/bin/status-upload.sh

@@ -0,0 +1,16 @@
+#!/bin/sh
+
+pid_list="$(ps aux | grep ipfcst-spare2 | grep -v grep | awk '{print $2}')"
+pid_count=$(echo $pid_list | wc -w)
+if test $pid_count -eq 1; then
+	echo "spare2 running, pid is $pid_list"
+	exit 0
+elif test $pid_count -gt 1; then
+	echo "Multiple spare2 running $pid_list"
+	exit 1
+elif test -z $pid_list; then
+	echo "spare2 is not running"
+	exit 1
+fi
+
+exit 0

+ 7 - 8
syjy/ipfcstV3/bin/stop-console.sh

@@ -2,16 +2,15 @@
 
 echo "Shutting down console"
 pid_list="$(ps aux | grep ipfcst-console | grep -v grep | awk '{print $2}')"
-if test -z $pid_list ; then
+if test -z $pid_list; then
 	echo "console is not running"
 else
-	for pid in $pid_list;  
-	do  
-	if kill -0 "$pid" 2>/dev/null; then
-		echo "kill pid $pid"
-		kill -9 $pid
-	fi
-	done  
+	for pid in $pid_list; do
+		if kill -0 "$pid" 2>/dev/null; then
+			echo "kill pid $pid"
+			kill -9 $pid
+		fi
+	done
 fi
 
 exit 0

+ 7 - 8
syjy/ipfcstV3/bin/stop-monitor.sh

@@ -2,16 +2,15 @@
 
 echo "Shutting down Monitor"
 pid_list="$(ps aux | grep ipfcst-monitor | grep -v grep | awk '{print $2}')"
-if test -z $pid_list ; then
+if test -z $pid_list; then
 	echo "Monitor is not running"
 else
-	for pid in $pid_list;  
-	do  
-	if kill -0 "$pid" 2>/dev/null; then
-		echo "kill pid $pid"
-		kill -9 $pid
-	fi
-	done  
+	for pid in $pid_list; do
+		if kill -0 "$pid" 2>/dev/null; then
+			echo "kill pid $pid"
+			kill -9 $pid
+		fi
+	done
 fi
 
 exit 0

+ 7 - 8
syjy/ipfcstV3/bin/stop-reportquery.sh

@@ -2,16 +2,15 @@
 
 echo "Shutting down reportquery"
 pid_list="$(ps aux | grep ipfcst-reportquery | grep -v grep | awk '{print $2}')"
-if test -z $pid_list ; then
+if test -z $pid_list; then
 	echo "reportquery is not running"
 else
-	for pid in $pid_list;  
-	do  
-	if kill -0 "$pid" 2>/dev/null; then
-		echo "kill pid $pid"
-		kill -9 $pid
-	fi
-	done  
+	for pid in $pid_list; do
+		if kill -0 "$pid" 2>/dev/null; then
+			echo "kill pid $pid"
+			kill -9 $pid
+		fi
+	done
 fi
 
 exit 0

+ 16 - 0
syjy/ipfcstV3/bin/stop-spare2.sh

@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "Shutting down spare2"
+pid_list="$(ps aux | grep ipfcst-spare2 | grep -v grep | awk '{print $2}')"
+if test -z "${pid_list}"; then
+	echo "spare2 is not running"
+else
+	for pid in $pid_list; do
+		if kill -0 "$pid" 2>/dev/null; then
+			echo "kill pid $pid"
+			kill -9 $pid
+		fi
+	done
+fi
+
+exit 0

+ 16 - 0
syjy/ipfcstV3/bin/stop-upload.sh

@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "Shutting down upload"
+pid_list="$(ps aux | grep ipfcst-upload | grep -v grep | awk '{print $2}')"
+if test -z "${pid_list}"; then
+	echo "upload is not running"
+else
+	for pid in $pid_list; do
+		if kill -0 "$pid" 2>/dev/null; then
+			echo "kill pid $pid"
+			kill -9 $pid
+		fi
+	done
+fi
+
+exit 0

+ 1 - 1
syjy/ipfcstV3/bin/update-console.sh

@@ -7,4 +7,4 @@ unzip -o -d $basedir $basedir/receive/ipfcst-console.zip
 chmod -R 777 $basedir
 sh $basedir/bin/restart-console.sh
 
-exit 0
+exit 0

+ 1 - 1
syjy/ipfcstV3/bin/update-lib.sh

@@ -6,4 +6,4 @@ rm -rf $basedir/ipfcst-lib
 unzip -o -d $basedir $basedir/receive/ipfcst-lib.zip
 chmod -R 777 $basedir
 
-exit 0
+exit 0

+ 1 - 1
syjy/ipfcstV3/bin/update-monitor.sh

@@ -7,4 +7,4 @@ unzip -o -d $basedir $basedir/receive/ipfcst-monitor.zip
 chmod -R 777 $basedir
 sh $basedir/bin/restart-monitor.sh
 
-exit 0
+exit 0

+ 1 - 1
syjy/ipfcstV3/bin/update-reportquery.sh

@@ -7,4 +7,4 @@ unzip -o -d $basedir $basedir/receive/ipfcst-reportquery.zip
 chmod -R 777 $basedir
 sh $basedir/bin/restart-reportquery.sh
 
-exit 0
+exit 0

+ 10 - 0
syjy/ipfcstV3/bin/update-spare2.sh

@@ -0,0 +1,10 @@
+#!/bin/sh
+
+export basedir=/home/syjy/ipfcstV3
+
+cp -f $basedir/bin/start-spare2.sh $basedir/original/bin
+unzip -o -d $basedir $basedir/receive/ipfcst-spare2.zip
+chmod -R 777 $basedir
+sh $basedir/bin/restart-spare2.sh
+
+exit 0

+ 10 - 0
syjy/ipfcstV3/bin/update-upload.sh

@@ -0,0 +1,10 @@
+#!/bin/sh
+
+export basedir=/home/syjy/ipfcstV3
+
+cp -f $basedir/bin/start-upload.sh $basedir/original/bin
+unzip -o -d $basedir $basedir/receive/ipfcst-upload.zip
+chmod -R 777 $basedir
+sh $basedir/bin/restart-upload.sh
+
+exit 0

+ 50 - 39
syjy/ipfcstV3/settings/console

@@ -1,4 +1,14 @@
 #!/bin/sh
+### BEGIN INIT INFO
+# Provides:          console
+# Required-Start:    $local_fs $network
+# Required-Stop:     $local_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: console service
+# Description:       console service daemon
+### END INIT INFO
+
 #
 # console	This shell script takes care of starting and stopping
 #		the ipfcst-console subsystem (console).
@@ -16,60 +26,61 @@
 # Support for extra options passed to console
 command=$1 && shift
 extra_opts="$@"
+v3home=/home/syjy/ipfcstV3
 
-start(){
-    sh /home/syjy/ipfcstV3/bin/start-console.sh
+start() {
+	sh ${v3home}/bin/start-console.sh
 }
 
-stop(){
-	sh /home/syjy/ipfcstV3/bin/stop-console.sh
+stop() {
+	sh ${v3home}/bin/stop-console.sh
 }
 
-restart(){
-    stop
-    start
+restart() {
+	stop
+	start
 }
 
-status(){
-	sh /home/syjy/ipfcstV3/bin/status-console.sh
+status() {
+	sh ${v3home}/bin/status-console.sh
 }
 
-
 # See how we were called.
 case "$command" in
-  start)
+start)
 	start
 	;;
-  startup)
+startup)
 	start
 	;;
-  stop)
-    stop
-    ;;
-  shutdown)
-    stop
-    ;;
-  status)
-    status
-    ;;
-  state)
-    status
-    ;;
-  restart)
-    restart
-    ;;
-  restartup)
-    restart
-    ;;
-  reload)
-    exit 3
-    ;;
-  force-reload)
-    restart
-    ;;
-  *)
-    echo $"Usage: $0 {start|startup|stop|shutdown|status|state|restart|restartup|reload|force-reload}"
-    exit 2
+stop)
+	stop
+	;;
+shutdown)
+	stop
+	;;
+status)
+	status
+	;;
+state)
+	status
+	;;
+restart)
+	restart
+	;;
+restartup)
+	restart
+	;;
+reload)
+	exit 3
+	;;
+force-reload)
+	restart
+	;;
+*)
+	echo $"Usage: $0 {start|startup|stop|shutdown|status|state|restart|restartup|reload|force-reload}"
+	exit 2
+	;;
 esac
 
 exit $?

+ 2 - 2
syjy/ipfcstV3/settings/console.service

@@ -6,7 +6,7 @@ After=network.target
 Type=forking
 ExecStart=/home/syjy/ipfcstV3/bin/start-console.sh
 ExecStop=/home/syjy/ipfcstV3/bin/stop-console.sh
-ExecRestart=/home/syjy/ipfcstV3/bin/restart-console.sh
-
+PrivateTmp=True
 [Install]
 WantedBy=multi-user.target
+

+ 50 - 39
syjy/ipfcstV3/settings/monitor

@@ -1,4 +1,14 @@
 #!/bin/sh
+### BEGIN INIT INFO
+# Provides:          monitor
+# Required-Start:    $local_fs $network
+# Required-Stop:     $local_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: monitor service
+# Description:       monitor service daemon
+### END INIT INFO
+
 #
 # monitor	This shell script takes care of starting and stopping
 #		the ipfcst-monitor subsystem (monitor).
@@ -16,60 +26,61 @@
 # Support for extra options passed to monitor
 command=$1 && shift
 extra_opts="$@"
+v3home=/home/syjy/ipfcstV3
 
-start(){
-    sh /home/syjy/ipfcstV3/bin/start-monitor.sh
+start() {
+	sh ${v3home}/bin/start-monitor.sh
 }
 
-stop(){
-	sh /home/syjy/ipfcstV3/bin/stop-monitor.sh
+stop() {
+	sh ${v3home}/bin/stop-monitor.sh
 }
 
-restart(){
-    stop
-    start
+restart() {
+	stop
+	start
 }
 
-status(){
-	sh /home/syjy/ipfcstV3/bin/status-monitor.sh
+status() {
+	sh ${v3home}/bin/status-monitor.sh
 }
 
-
 # See how we were called.
 case "$command" in
-  start)
+start)
 	start
 	;;
-  startup)
+startup)
 	start
 	;;
-  stop)
-    stop
-    ;;
-  shutdown)
-    stop
-    ;;
-  status)
-    status
-    ;;
-  state)
-    status
-    ;;
-  restart)
-    restart
-    ;;
-  restartup)
-    restart
-    ;;
-  reload)
-    exit 3
-    ;;
-  force-reload)
-    restart
-    ;;
-  *)
-    echo $"Usage: $0 {start|startup|stop|shutdown|status|state|restart|restartup|reload|force-reload}"
-    exit 2
+stop)
+	stop
+	;;
+shutdown)
+	stop
+	;;
+status)
+	status
+	;;
+state)
+	status
+	;;
+restart)
+	restart
+	;;
+restartup)
+	restart
+	;;
+reload)
+	exit 3
+	;;
+force-reload)
+	restart
+	;;
+*)
+	echo $"Usage: $0 {start|startup|stop|shutdown|status|state|restart|restartup|reload|force-reload}"
+	exit 2
+	;;
 esac
 
 exit $?

+ 2 - 2
syjy/ipfcstV3/settings/monitor.service

@@ -6,7 +6,7 @@ After=network.target
 Type=forking
 ExecStart=/home/syjy/ipfcstV3/bin/start-monitor.sh
 ExecStop=/home/syjy/ipfcstV3/bin/stop-monitor.sh
-ExecRestart=/home/syjy/ipfcstV3/bin/restart-monitor.sh
-
+PrivateTmp=True
 [Install]
 WantedBy=multi-user.target
+

+ 50 - 39
syjy/ipfcstV3/settings/reportquery

@@ -1,4 +1,14 @@
 #!/bin/sh
+### BEGIN INIT INFO
+# Provides:          reportquery
+# Required-Start:    $local_fs $network
+# Required-Stop:     $local_fs
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 1 6
+# Short-Description: reportquery service
+# Description:       console reportquery daemon
+### END INIT INFO
+
 #
 # reportquery	This shell script takes care of starting and stopping
 #		the ipfcst-reportquery subsystem (reportquery).
@@ -16,60 +26,61 @@
 # Support for extra options passed to reportquery
 command=$1 && shift
 extra_opts="$@"
+v3home=/home/syjy/ipfcstV3
 
-start(){
-    sh /home/syjy/ipfcstV3/bin/start-reportquery.sh
+start() {
+	sh ${v3home}/bin/start-reportquery.sh
 }
 
-stop(){
-	sh /home/syjy/ipfcstV3/bin/stop-reportquery.sh
+stop() {
+	sh ${v3home}/bin/stop-reportquery.sh
 }
 
-restart(){
-    stop
-    start
+restart() {
+	stop
+	start
 }
 
-status(){
-	sh /home/syjy/ipfcstV3/bin/status-reportquery.sh
+status() {
+	sh ${v3home}/bin/status-reportquery.sh
 }
 
-
 # See how we were called.
 case "$command" in
-  start)
+start)
 	start
 	;;
-  startup)
+startup)
 	start
 	;;
-  stop)
-    stop
-    ;;
-  shutdown)
-    stop
-    ;;
-  status)
-    status
-    ;;
-  state)
-    status
-    ;;
-  restart)
-    restart
-    ;;
-  restartup)
-    restart
-    ;;
-  reload)
-    exit 3
-    ;;
-  force-reload)
-    restart
-    ;;
-  *)
-    echo $"Usage: $0 {start|startup|stop|shutdown|status|state|restart|restartup|reload|force-reload}"
-    exit 2
+stop)
+	stop
+	;;
+shutdown)
+	stop
+	;;
+status)
+	status
+	;;
+state)
+	status
+	;;
+restart)
+	restart
+	;;
+restartup)
+	restart
+	;;
+reload)
+	exit 3
+	;;
+force-reload)
+	restart
+	;;
+*)
+	echo $"Usage: $0 {start|startup|stop|shutdown|status|state|restart|restartup|reload|force-reload}"
+	exit 2
+	;;
 esac
 
 exit $?

+ 2 - 2
syjy/ipfcstV3/settings/reportquery.service

@@ -6,7 +6,7 @@ After=network.target
 Type=forking
 ExecStart=/home/syjy/ipfcstV3/bin/start-reportquery.sh
 ExecStop=/home/syjy/ipfcstV3/bin/stop-reportquery.sh
-ExecRestart=/home/syjy/ipfcstV3/bin/restart-reportquery.sh
-
+PrivateTmp=True
 [Install]
 WantedBy=multi-user.target
+