Created
April 23, 2016 21:35
-
-
Save te-online/2931a4ab201d34505c18435c2167262d to your computer and use it in GitHub Desktop.
A shell file that uses telegram-notify.sh to send a Telegram message via a bot when you check it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CURRENT_ROOT=$(df / | grep / | awk '{ print $5}' | sed 's/%//g') | |
CURRENT_BACKUP=$(df /dev/sda | grep / | awk '{ print $5}' | sed 's/%//g') | |
MESSAGE="Just had a look at the space of my disks 🔬. | |
My *root disk's* remaining free space is *${CURRENT_ROOT}%*. | |
My *backup disk's* remaining free space is *${CURRENT_BACKUP}%*." | |
sh telegram-notify.sh "${MESSAGE}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment