Page MenuHomeDevCentral

D3416.id8869.diff
No OneTemporary

D3416.id8869.diff

diff --git a/roles/core/monitoring/files/checks/nrpe/os_family/FreeBSD/check-os-release.sh b/roles/core/monitoring/files/checks/nrpe/os_family/FreeBSD/check-os-release.sh
new file mode 100755
--- /dev/null
+++ b/roles/core/monitoring/files/checks/nrpe/os_family/FreeBSD/check-os-release.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+set -e
+set -u
+
+if [ ! -f /var/run/os-release ]; then
+ echo "Restart service os-release to generate missing os-release file."
+ exit 2
+fi
+
+PATH=/bin:/usr/bin:/sbin
+which freebsd-version > /dev/null || exit 3
+VERSION_INSTALLED=$(freebsd-version -k)
+
+. /var/run/os-release
+
+if [ "$VERSION_INSTALLED" != "$VERSION" ]; then
+ echo "/etc/os-release isn't up-to-date, restart os-release service"
+ exit 1
+fi
+
+exit 0

File Metadata

Mime Type
text/plain
Expires
Fri, Nov 15, 04:26 (11 h, 58 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2244104
Default Alt Text
D3416.id8869.diff (759 B)

Event Timeline