Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3781669
D3416.id8813.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
759 B
Referenced Files
None
Subscribers
None
D3416.id8813.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D3416: Check if /etc/os-release is up-to-date on FreeBSD
Attached
Detach File
Event Timeline
Log In to Comment