implement source plugin check

This commit is contained in:
root@atlantishq-michy-sheppy
2020-06-22 22:05:53 +02:00
parent b421454b42
commit e2976138e1
2 changed files with 24 additions and 0 deletions

20
check_source_plugins.sh Executable file
View File

@@ -0,0 +1,20 @@
#!/bin/bash
PLUGIN_NAME=Skillbird
/usr/local/bin/insurgency_rcon sm plugins list Skillbird | grep $PLUGIN_NAME &>/dev/null
ins01=$?
/usr/local/bin/insurgency_small_rcon sm plugins list Skillbird | grep $PLUGIN_NAME &>/dev/null
ins02=$?
if [ "$ins01" -ne "0" ]; then
echo "Plugin not loaded!? (ins01)"
exit 1;
fi
if [ "$ins02" -ne "0" ]; then
echo "Plugin not loaded!? (ins02)"
exit 1;
fi
echo "Plugin Loaded"
exit 0

View File

@@ -5,3 +5,7 @@ object CheckCommand "source-server" {
"-p" = "$port$" "-p" = "$port$"
} }
} }
object CheckCommand "source-plugins" {
command = [ "/etc/icinga2/monitoring-tools/check_source_plugins.sh" ]
}