debug.sh 484 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. set -e -o pipefail
  3. if [ -d /usr/local/go ]; then
  4. export PATH="$PATH:/usr/local/go/bin"
  5. fi
  6. DIR=$(dirname "$0")
  7. PROJECT=$DIR/../..
  8. pushd $PROJECT
  9. git fetch
  10. git reset FETCH_HEAD --hard
  11. git clean -fdx
  12. go install -v -trimpath -ldflags "-s -w -buildid=" -tags with_quic,with_acme,debug ./cmd/sing-box
  13. popd
  14. sudo systemctl stop sing-box
  15. sudo cp $(go env GOPATH)/bin/sing-box /usr/local/bin/
  16. sudo systemctl start sing-box
  17. sudo journalctl -u sing-box --output cat -f