From a33f898b79a6bed35ff458a4eda5d36d3d9dec1f Mon Sep 17 00:00:00 2001 From: iAmInAction <83808704+iAmInActions@users.noreply.github.com> Date: Sun, 10 Mar 2024 19:30:47 +0100 Subject: [PATCH] Add setdatefromhttp.sh Sets system time to server time using an http 404 error --- setdatefromhttp.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 setdatefromhttp.sh diff --git a/setdatefromhttp.sh b/setdatefromhttp.sh new file mode 100644 index 0000000..074ed91 --- /dev/null +++ b/setdatefromhttp.sh @@ -0,0 +1,2 @@ +#!/bin/bash +date -s "$(curl -I 'http://muellers-software.org/thispagegivesa404error' 2>/dev/null | grep -i '^date:' | sed 's/^[Dd]ate: //g' | tr -d ,)"