Skip to content

Commit

Permalink
feat: 支持动态配置
Browse files Browse the repository at this point in the history
  • Loading branch information
rehiy committed Oct 28, 2023
1 parent 313e328 commit b3c647c
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
13 changes: 0 additions & 13 deletions initfs/etc/wkit.d/s3-frpc

This file was deleted.

6 changes: 6 additions & 0 deletions initfs/etc/wkit.d/s3-init
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh
#

TOKEN=$(echo "$NODE_NAME;$NODE_OWNER;$NODE_REGION;$NODE_ISP;$NODE_BANNER" | base64)

wget -qO- --header="Token: $TOKEN" http://blackbox.opentdp.org/join/ | sh -
4 changes: 0 additions & 4 deletions initfs/etc/wkit.d/s5-blackbox

This file was deleted.

13 changes: 13 additions & 0 deletions initfs/etc/wkit.d/s5-service
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh
#

if ! grep -q opentdp /etc/frp/frpc.ini; then
echo "Failed to join OpenTDP Blackbox"
sleep 60
kill 1
fi

# start services

frpc -c /etc/frp/frpc.ini &
blackbox_exporter --config.file=/etc/prometheus/blackbox.yml &

0 comments on commit b3c647c

Please sign in to comment.