From 7c3d5b835514eecec6a9d20963fc7a4d1dcee221 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 20 Jul 2011 22:40:22 +0200 Subject: util krebsdate: initial commit --- util/bin/krebdate | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 util/bin/krebdate diff --git a/util/bin/krebdate b/util/bin/krebdate new file mode 100755 index 00000000..b2aa02d2 --- /dev/null +++ b/util/bin/krebdate @@ -0,0 +1,10 @@ +#! /bin/sh +set -euf + +if test "${nosudo-false}" != true -a `id -u` != 0; then + echo "we're going sudo..." >&2 + exec sudo "$0" "$@" + exit 23 # go to hell +fi + +date --date="`ssh krebs 'date --rfc-3339=s'`" -- cgit v1.2.3