Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- ssdPerc=$(df /home | awk '{ print $5 }' | tail -n 1)
- ssdAct=${ssdPerc::-1}
- hddPerc=$(df /raid | awk '{ print $5 }' | tail -n 1)
- hddAct=${hddPerc::-1}
- If [ "$ssdAct" -gt 1 ]
- then
- echo "Running out of space on the SSD. Current usage is at $ssdPerc" | mail -s "WARNING: Server SSD Usage at $ssdPerc" zachoooo@gmail.com
- fi
- If [ "$hddAct" -gt 1 ]
- then
- echo "Running out of space on the HDD. Current usage is at hddPerc" | mail -s "WARNING: Server HDD Usage at $hddPerc" zachoooo@gmail.com
- fi
- root@zsugano:/usr/bin# storage_check
- /usr/bin/storage_check: line 7: If: command not found
- /usr/bin/storage_check: line 8: syntax error near unexpected token `then'
- /usr/bin/storage_check: line 8: `then'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement