Add linux server scripts

This commit is contained in:
世界
2022-07-30 08:39:34 +08:00
parent 0f7f800e95
commit 9b9b5ebb72
6 changed files with 75 additions and 0 deletions

18
release/local/update.sh Executable file
View File

@@ -0,0 +1,18 @@
#!/usr/bin/env bash
set -e -o pipefail
DIR=$(dirname "$0")
PROJECT=$DIR/../..
pushd $PROJECT
git fetch
git reset FETCH_HEAD --hard
git clean -fdx
go install -v -trimpath -ldflags "-s -w -buildid=" -tags "no_gvisor" ./cmd/sing-box
popd
sudo systemctl stop sing-box
sudo cp $(go env GOPATH)/bin/sing-box /usr/local/bin/
sudo systemctl start sing-box
sudo journalctl -u sing-box --output cat -f