diff options
author | tv <tv@also> | 2011-07-20 22:40:22 +0200 |
---|---|---|
committer | tv <tv@also> | 2011-07-20 22:40:22 +0200 |
commit | c8c24ddcee1b218ca52c631ca6347526dfc05614 (patch) | |
tree | b7208305deb103ab25021ed7b63838b5f1d5f24a /util/bin/krebdate | |
parent | 455ff42da6d341be0bc6b757d6f64f2bd2af6d91 (diff) |
util krebsdate: initial commit
Diffstat (limited to 'util/bin/krebdate')
-rwxr-xr-x | util/bin/krebdate | 10 |
1 files changed, 10 insertions, 0 deletions
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'`" |