#! /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 build -ldflags="-s -w" -o omcDevApp

BUILD_ID=dontKillMe
nohup ./omcDevApp -c ./dev.yaml > ./dev.log 2>&1 &
echo ok