random-scripts/setdatefromhttp.sh
iAmInAction a33f898b79
Add setdatefromhttp.sh
Sets system time to server time using an http 404 error
2024-03-10 19:30:47 +01:00

3 lines
152 B
Bash

#!/bin/bash
date -s "$(curl -I 'http://muellers-software.org/thispagegivesa404error' 2>/dev/null | grep -i '^date:' | sed 's/^[Dd]ate: //g' | tr -d ,)"