Skip to content

Commit

Permalink
fix detect
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar committed Oct 28, 2021
1 parent 3714f83 commit 68e6bf2
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions embed/templates/scripts/run_prometheus.sh.tpl
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
#!/bin/bash
set -e

function hup_handle {
childpid=$(cat /proc/$$/task/$$/children)
child=($childpid)
kill -HUP ${child[@]:0:2}
wait
}
trap hup_handle HUP

DEPLOY_DIR={{.DeployDir}}
cd "${DEPLOY_DIR}" || exit 1

# WARNING: This file was auto-generated. Do not edit!
# All your edit might be overwritten!

if [-d "bin/ng-monitoring-server"]; then
if [ -e "bin/ng-monitoring-server" ]; then
{{- if .NumaNode}}
numactl --cpunodebind={{.NumaNode}} --membind={{.NumaNode}} bin/ng-monitoring-server \
{{- else}}
Expand Down Expand Up @@ -35,5 +43,5 @@ bin/prometheus/prometheus \
2>&1 | tee -i -a "{{.LogDir}}/prometheus.log" &
prometheus_pid=$!

trap 'kill $ng_pid $prometheus_pid; exit' CHLD
#trap 'kill $ng_pid $prometheus_pid; exit' CHLD
wait

0 comments on commit 68e6bf2

Please sign in to comment.