diff --git a/check_source_plugins.sh b/check_source_plugins.sh new file mode 100755 index 0000000..6a93676 --- /dev/null +++ b/check_source_plugins.sh @@ -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 diff --git a/commands.d/source-command.conf b/commands.d/source-command.conf index d12bb8f..24e1023 100644 --- a/commands.d/source-command.conf +++ b/commands.d/source-command.conf @@ -5,3 +5,7 @@ object CheckCommand "source-server" { "-p" = "$port$" } } + +object CheckCommand "source-plugins" { + command = [ "/etc/icinga2/monitoring-tools/check_source_plugins.sh" ] +}