48 lines
1.5 KiB
Ruby
48 lines
1.5 KiB
Ruby
class MonitoringPlugins < Formula
|
|
desc "Plugins for nagios compatible monitoring systems"
|
|
homepage "https://www.monitoring-plugins.org"
|
|
url "https://www.monitoring-plugins.org/download/monitoring-plugins-2.3.1.tar.gz"
|
|
sha256 "f56eb84871983fd719247249e3532228b37e2efaae657a3979bd14ac1f84a35b"
|
|
|
|
livecheck do
|
|
url "https://www.monitoring-plugins.org/download.html"
|
|
regex(/href=.*?monitoring-plugins[._-]v?(\d+(?:\.\d+)+)\.t/i)
|
|
end
|
|
|
|
bottle do
|
|
sha256 cellar: :any, arm64_big_sur: "5044511cc0f5a64f3424d4507559b6ca316669121f4b15d58ef6b9cec5bba3f8"
|
|
sha256 cellar: :any, big_sur: "a49576ad287d073c67e0da12be686ba737abe34e5f61813a2e308cd44c427017"
|
|
sha256 cellar: :any, catalina: "644b33de5338e00a2103c87aa4b55a39b7a16e2ecee49936f2251a0a97756f0f"
|
|
sha256 cellar: :any, mojave: "883707c4b2fe29a6d0b8453d4d19005128761d5d6952b9fe21292ec4b4cb2b11"
|
|
end
|
|
|
|
depends_on "openssl@1.1"
|
|
|
|
conflicts_with "nagios-plugins", because: "both install their plugins to the same folder"
|
|
|
|
def install
|
|
args = %W[
|
|
--disable-dependency-tracking
|
|
--prefix=#{libexec}
|
|
--libexecdir=#{libexec}/sbin
|
|
--with-openssl=#{Formula["openssl@1.1"].opt_prefix}
|
|
]
|
|
|
|
system "./configure", *args
|
|
system "make", "install"
|
|
sbin.write_exec_script Dir["#{libexec}/sbin/*"]
|
|
end
|
|
|
|
def caveats
|
|
<<~EOS
|
|
All plugins have been installed in:
|
|
#{HOMEBREW_PREFIX}/sbin
|
|
EOS
|
|
end
|
|
|
|
test do
|
|
output = shell_output("#{sbin}/check_dns -H 8.8.8.8 -t 3")
|
|
assert_match "DNS OK", output
|
|
end
|
|
end
|