Skip to content

[Feature Request]: check/ck_ntp_sync: check if current ntp status or system clock is synchronized  #81

@aronchanisme

Description

@aronchanisme

Is there an existing issue for the feature request?

  • I have checked the existing issues.

Feature Description

check if current ntp status or system clock is synchronized

usage: 
check/ck_ntp_sync.sh

example:
check/ck_ntp_sync.sh

output:
return 0: if synced
return 1:  otherwise

Feature Implementation

sync_status=timedatectl status | grep "NTP synchronized\|System clock synchronized" | awk '{print $NF}'

if yes, return 0; otherwise return 1

Additional information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions