control 531 B

1234567891011121314151617181920212223242526
  1. #!/bin/bash
  2. source /etc/profile
  3. base_dir="/mnt/b2b-search"
  4. context_name="search-console-b2b"
  5. version="0.1.9-SNAPSHOT"
  6. cd $base_dir
  7. wf=$context_name-$version.war
  8. function install() {
  9. rm -rf $wf.bak
  10. if [ -f $wf ]; then
  11. mv -f $wf $wf.bak
  12. fi
  13. wget -q http://113.105.74.141:8081/artifactory/libs-release/com/uas/search/$context_name/$version/$wf
  14. }
  15. function run() {
  16. ps -ef|grep $wf|grep java|awk '{print $2}'|xargs kill -9
  17. nohup java -Dserver.port=8081 -jar $wf 1>log.log 2>nohup.log &
  18. }
  19. install
  20. run