-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcheck.default
40 lines (30 loc) · 879 Bytes
/
check.default
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# enable spinner
spinner_start
# check system load
check_load
# check free diskspace
check_diskfree
# ping localhost :-)
check_ping_alive
# tcp connect to local discard service
check_tcp_connect
# some rather random file checks:
# check if ./nomd exists
check_file_exists
# check if ./nomd~ does not exist
check_file_missing nomd~
# check if ./nomd is current
check_file_newer
# check internet connectivity ;-)
check_http_status
check_http_content
# check systemctl (if available) for failed units
command -v systemctl >/dev/null && check_systemctl
# run check_apt only on systems that have apt available
# the regexp tries to match both Ubuntu and Debian security sources
# BUT SEEMS TO FAIL ON DEBIAN - better use no parameter at all!
command -v apt >/dev/null && check_apt '(/updates|-security)'
# check for updates
check_nomd_updates
# remove spinner
spinner_stop