feat: 运行脚本
This commit is contained in:
18
restagent/run.sh
Normal file
18
restagent/run.sh
Normal file
@@ -0,0 +1,18 @@
|
||||
#! /usr/bin/bash
|
||||
|
||||
ps aux | grep "omcDevApp"
|
||||
|
||||
process_id=$(ps aux | grep "omcDevApp" | grep -v grep | awk '{print $2}')
|
||||
if [ -n "$process_id" ]; then
|
||||
kill -9 "$process_id"
|
||||
else
|
||||
echo "未找到匹配的进程"
|
||||
fi
|
||||
|
||||
go version
|
||||
go mod download
|
||||
|
||||
cd restagent/
|
||||
go build -ldflags="-s -w" -o omcDevApp
|
||||
nohup ./omcDevApp -c ./dev.yaml >> ./dev.log 2>&1 &
|
||||
echo ok
|
||||
Reference in New Issue
Block a user