Skip to main content
added 11 characters in body
Source Link
muru
  • 208.4k
  • 57
  • 518
  • 787

If you can afford the time to wait whatever time it takes before your system gets in sync, you can use the ntp-waitntp-wait command:

ntp-wait || exit -1 # i believe this would exit the script if it fails, but not sure of ntp-wait return codes, learn this first.

echo Time is synced, go ahead with backup tar rsync etc.

ntp-wait || exit -1 
# i believe this would exit the script if it fails, but not sure of ntp-wait return codes, learn this first.

echo Time is synced, go ahead with backup
tar
rsync etc.

If you can afford the time to wait whatever time it takes before your system gets in sync, you can use the ntp-wait command:

ntp-wait || exit -1 # i believe this would exit the script if it fails, but not sure of ntp-wait return codes, learn this first.

echo Time is synced, go ahead with backup tar rsync etc.

If you can afford the time to wait whatever time it takes before your system gets in sync, you can use the ntp-wait command:

ntp-wait || exit -1 
# i believe this would exit the script if it fails, but not sure of ntp-wait return codes, learn this first.

echo Time is synced, go ahead with backup
tar
rsync etc.
Source Link

If you can afford the time to wait whatever time it takes before your system gets in sync, you can use the ntp-wait command:

ntp-wait || exit -1 # i believe this would exit the script if it fails, but not sure of ntp-wait return codes, learn this first.

echo Time is synced, go ahead with backup tar rsync etc.