fix: start.sh

This commit is contained in:
wangfuduo 2026-10-31 14:29:55 +08:00
parent 10015eac1b
commit a1d8a00238
2 changed files with 20 additions and 9 deletions

View File

@ -10,15 +10,15 @@ app_domain = "https://twin.batiao8.com"
ingore_event = "/api/user/event"
[mysql]
host = "10.0.2.157"
port = 3307
host = "10.7.0.36"
port = 3308
user = "twin"
pass = "z[T)5svx--N(nUO("
db = "twin"
threshold = 10000
[elastic]
address = "http://10.0.2.133:9200"
address = "http://10.7.0.36:9200"
username = "elastic"
password = "o2NJzeAODwpfAgLJ5SFY"
@ -48,7 +48,7 @@ qy_kf_id = ""
[metric]
address = "http://10.0.2.157:8086"
address = "http://10.7.0.36:8086"
username = "batiao"
password = "Batiao12B"

View File

@ -1,5 +1,18 @@
#!/bin/bash
set -x
crash() {
SERVICE_NAME="$_SERVICE_NAME"
HOSTNAME_="${_POD_NAME:-$(hostname)}"
IP="$_POD_IP"
curl -sS -G "https://t.batiao8.com/ext/service/crash" \
--connect-timeout 3 --max-time 5 \
--retry 2 --retry-delay 1 \
--data-urlencode "service=$SERVICE_NAME" \
--data-urlencode "hostname=$HOSTNAME_" \
--data-urlencode "ip=$IP" \
>/dev/null 2>&1 || true
}
ROOT=$(cd `dirname $0`; pwd)
cd $ROOT
@ -9,8 +22,6 @@ fi
while [ true ];do
$ROOT/bin/$BINARY $@ >> log/run.log 2>&1
/usr/local/bin/sendproxy weixin "jiangyong,ranzhenghua" "[$HOSTNAME] [$CONFIG_ENV] [$BINARY] 服务崩溃[`date +"%Y-%m-%d %H:%M:%S"`]"
crash
sleep 10
done