tailhook / vagga-box

A virtualbox wrapper around vagga
9 stars 4 forks source link

[FEATURE REQUEST] Shortcut for syncing guest OS clock with NTPd #9

Open playpauseandstop opened 7 years ago

playpauseandstop commented 7 years ago

Right now when clock in guest OS unsyncronized it is possible to fix it with,

host:project $ vagga _box ssh
vagga:~ $ sudo rc-service ntpd restart
vagga:~ $ sleep 1

But what about having shortcut for this action? As it need to be done on regular basis after waking up laptop (for example).

tailhook commented 7 years ago

Well, I think we should check two options:

  1. Find if any ntp server can do it by itself (there are busybox ntpd, openntpd, chrony in alpine repo, maybe more, just check one by one)
  2. If that doesn't work, send date when running each vagga command and run sync if difference is big
playpauseandstop commented 7 years ago

For 2nd option need to remember next case: if web server runs as vagga app, the process still be running after laptop wake up, but there will be a time diff between guest & host OS due to handling time in guest OS by VirtualBox. In other words user need to re-run vagga supervisors or daemon commands, which is still much better then now.