mirror of
https://github.com/m8tin/cis.git
synced 2025-12-06 07:48:26 +01:00
Checks that ensure the correct basic configuration of the host
This commit is contained in:
10
script/check/host/all/system_timezone_is_berlin.check.sh
Executable file
10
script/check/host/all/system_timezone_is_berlin.check.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
_CURRENT_FILE='/etc/timezone'
|
||||
|
||||
#The file must be readable, then
|
||||
#the number of lines containing "Europe/Berlin" must be one.
|
||||
[ -r "${_CURRENT_FILE}" ] \
|
||||
&& [ "1" == "$(cat "${_CURRENT_FILE}" | grep 'Europe/Berlin' | grep -c .)" ] \
|
||||
&& exit 0
|
||||
exit 1
|
||||
Reference in New Issue
Block a user