Last active
November 8, 2016 19:09
-
-
Save jesustorresdev/1331876d6e1547aeb9b2d02861e9ae92 to your computer and use it in GitHub Desktop.
Smartmontools visual notification script for desktop environments
This file contains 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 -e | |
# | |
# smartmontools-run.d-notify - Smartmontools visual notification script for desktop environments | |
# | |
# https://gist.github.com/aplatanado/1331876d6e1547aeb9b2d02861e9ae92 | |
# | |
# Requires notify-send-all: | |
# https://gist.github.com/aplatanado/e8810dbceece820b4ae5aa0ee5ca200 | |
# | |
# Send message if notify-send-all command exists or exit silently | |
type -P notify-send-all &> /dev/null || exit 0 | |
notify-send-all --expire-time=0 --icon=emblem-important \ | |
"Your hard disk drive is failing!" \ | |
"S.M.A.R.T. message: | |
$SMARTD_MESSAGE" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment