Add setdatefromhttp.sh

Sets system time to server time using an http 404 error
This commit is contained in:
iAmInAction 2024-03-10 19:30:47 +01:00 committed by GitHub
parent 2694664aee
commit a33f898b79
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

2
setdatefromhttp.sh Normal file
View File

@ -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 ,)"