Add Chrony support (less invasive) 3548bd3573

This commit is contained in:
Ilia Rostovtsev
2020-07-04 17:12:21 +03:00
parent 8d675e1bc8
commit f01e2d3eb1

View File

@ -46,6 +46,11 @@ if (&has_command("ntpdate")) {
elsif (&has_command("sntp")) {
$out = &backquote_logged("sntp -s $servs 2>&1");
}
elsif (&has_command("chronyc")) {
$out = &backquote_logged("systemctl restart chronyd 2>&1");
$out .= &backquote_logged("chronyc makestep 2>&1");
sleep 5;
}
else {
$out = "Missing ntpdate and sntp commands";
$? = 1;