Help us shape the future of Go! Take the 2026 Go Developer Survey

gntp

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 29, 2019 License: BSD-2-Clause Imports: 6 Imported by: 0

README

ntp

Small NTP client written in GO. Used to schedule reboots on servers who's time is running in a fixed loop, and do not contain their own NTP service.

Usage

Place somewhere in your path and invoke without any arguments:

gntp

----
15 23 55

Parse with awk to get hours:

gntp | awk '{print $1}'

run from cron every hour E=`/usr/local/bin/gntp | awk '{print $1}'`

if [ "${E}" = "${reboot_hour}" ]; then
  # sleep for an hour and then reboot
  sleep 3600 && shutdown -r now
fi

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL