mirror of https://github.com/chubin/wttr.in
Compare commits
No commits in common. '235581925fa2e09a42e9631e2c23294a1972ee0e' and '575908ae51010b2d71c0b1d4bf4def997bea0fa3' have entirely different histories.
235581925f
...
575908ae51
@ -1,14 +0,0 @@
|
|||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
LOG_DIR="/wttr.in/log"
|
|
||||||
LOG_FILE="$LOG_DIR/diskspace.log"
|
|
||||||
|
|
||||||
DISK=/wttr.in
|
|
||||||
|
|
||||||
log() {
|
|
||||||
mkdir -p "$LOG_DIR"
|
|
||||||
|
|
||||||
echo "$(date +"[%Y-%m-%d %H:%M:%S]") $*" | tee -a "$LOG_FILE"
|
|
||||||
}
|
|
||||||
|
|
||||||
log $(df -k "$DISK" | tail -1 | awk '{print $4}')
|
|
Loading…
Reference in new issue