Page MenuHomeDevCentral

D3416.id8813.diff
No OneTemporary

D3416.id8813.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
Tue, Nov 26, 21:16 (21 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2265109
Default Alt Text
D3416.id8813.diff (759 B)

Event Timeline