mirror of
https://github.com/alexreinert/homematic_check_mk.git
synced 2023-10-10 13:37:02 +02:00
Made some changes to be compatible with YAHM
This commit is contained in:
parent
ac9fca048a
commit
51efc44e6b
@ -49,10 +49,14 @@ proc handle_connection { channelId clientAddress clientPort } {
|
||||
puts $channelId "[exec sed 1,2d /proc/net/dev]"
|
||||
|
||||
puts $channelId "<<<df>>>"
|
||||
if { [regexp CCU2 [exec grep Hardware < /proc/cpuinfo]] == 0 } {
|
||||
puts $channelId "[exec df -PTk | sed 1d]"
|
||||
} else {
|
||||
if { [exec busybox | sed -n 1p | awk { { print $2 } }] == "v1.20.2" } {
|
||||
puts $channelId "[exec df -Pk | sed 1d]"
|
||||
} else {
|
||||
puts $channelId "[exec df -PTk | sed 1d]"
|
||||
puts $channelId "<<<df>>>"
|
||||
puts $channelId "\[df_inodes_start\]"
|
||||
puts $channelId "[exec df -PTi | sed 1d]"
|
||||
puts $channelId "\[df_inodes_end\]"
|
||||
}
|
||||
|
||||
puts $channelId "<<<mounts>>>"
|
||||
@ -146,7 +150,7 @@ proc get_homematic_bidcos_devices { } {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
proc read_var { filename varname } {
|
||||
set fd [open $filename r]
|
||||
set var ""
|
||||
@ -162,7 +166,7 @@ proc read_var { filename varname } {
|
||||
proc get_version { } {
|
||||
return [read_var /boot/VERSION VERSION]
|
||||
}
|
||||
|
||||
|
||||
proc main { } {
|
||||
startup
|
||||
|
||||
@ -184,4 +188,3 @@ if { [catch { main } err] } then {
|
||||
log $err
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ case "$1" in
|
||||
|
||||
info)
|
||||
echo "Info: <b>(Inoffical) check_mk agent</b>"
|
||||
echo "Version: 1.1"
|
||||
echo "Version: 1.2"
|
||||
echo "Name: check_mk_agent"
|
||||
echo "Operations: uninstall restart"
|
||||
;;
|
||||
|
@ -5,11 +5,6 @@ CONFIG_DIR=/usr/local/etc/config
|
||||
ADDON_DIR=/usr/local/addons/${ADDONNAME}
|
||||
RCD_DIR=${CONFIG_DIR}/rc.d
|
||||
|
||||
mount | grep /usr/local 2>&1 >/dev/null
|
||||
if [ $? -eq 1 ]; then
|
||||
mount /usr/local
|
||||
fi
|
||||
|
||||
# create necessary directories
|
||||
mkdir -p ${ADDON_DIR}
|
||||
chmod 755 ${ADDON_DIR}
|
||||
|
@ -15,6 +15,6 @@
|
||||
'plugins/wato/homematic.py']},
|
||||
'name': 'homematic',
|
||||
'title': 'Homematic',
|
||||
'version': '1.1',
|
||||
'version': '1.2',
|
||||
'version.min_required': '1.2.8',
|
||||
'version.packaged': '1.4.0p8'}
|
||||
|
Loading…
Reference in New Issue
Block a user