mirror of https://github.com/CISOfy/lynis.git
[TIME-3104] Changed timedatectl test
This commit is contained in:
parent
01c687eb55
commit
1a832476bb
|
@ -70,7 +70,7 @@
|
|||
fi
|
||||
|
||||
# Check running processes
|
||||
FIND=`${PSBINARY} ax | ${GREPBINARY} "ntpd" | ${GREPBINARY} -v "dntpd" | ${GREPBINARY} -v "grep"`
|
||||
FIND=$(${PSBINARY} ax | ${GREPBINARY} "ntpd" | ${GREPBINARY} -v "dntpd" | ${GREPBINARY} -v "grep")
|
||||
if [ ! "${FIND}" = "" ]; then
|
||||
FOUND=1; NTPD_RUNNING=1; NTP_DAEMON_RUNNING=1; NTP_CONFIG_TYPE_DAEMON=1
|
||||
NTP_DAEMON="ntpd"
|
||||
|
@ -86,8 +86,8 @@
|
|||
fi
|
||||
|
||||
# Check timedate daemon (systemd)
|
||||
if [ ! "${TIMEDATECTL}" = "" ]; then
|
||||
FIND=`${TIMEDATECTL} status | ${GREPBINARY} "NTP enabled: yes"`
|
||||
if [ ! -z "${TIMEDATECTL}" ]; then
|
||||
FIND=$(${TIMEDATECTL} status | ${GREPBINARY} "NTP synchronized: yes")
|
||||
if [ ! "${FIND}" = "" ]; then
|
||||
# Check for systemd-timesyncd
|
||||
if [ -f /etc/systemd/timesyncd.conf ]; then
|
||||
|
|
Loading…
Reference in New Issue