Add CheckMK agent deployment script for openwrt

References #12, #18

Скрипт, за да качваме по-лесно агента на OpenWRT рутерите.
Expose-ва изхода от агента на порт 6556/tcp през socat.
This commit is contained in:
Albert Stefanov 2023-10-15 08:12:57 +03:00
parent c67b311e03
commit d458b3415a
1 changed files with 17 additions and 0 deletions

17
tools/openwrt/deploy_agent.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/sh
wget http://10.20.0.253/openfest/check_mk/agents/check_mk_agent.openwrt -O /usr/bin/check_mk_agent
chmod 755 /usr/bin/check_mk_agent
opkg update
opkg install socat
cat > /etc/config/socat << EOF
config socat 'check_mk_agent'
option enable '1'
option SocatOptions '-U TCP-LISTEN:6556,fork,reuseaddr EXEC:/usr/bin/check_mk_agent'
option user 'root'
EOF
service socat enable
service socat start