restart.sh 334 B

12345678910
  1. #!/bin/bash
  2. echo "go build"
  3. go mod tidy
  4. go build -o go-admin main.go
  5. chmod +x ./go-admin
  6. echo "kill go-admin service"
  7. killall go-admin # kill go-admin service
  8. nohup ./go-admin server -c=config/settings.dev.yml >> access.log 2>&1 & #后台启动服务将日志写入access.log文件
  9. echo "run go-admin success"
  10. ps -aux | grep go-admin