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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
⌂ 换网址