mirror_zfs/cmd/zed/zed.d
Chris Dunlap a0d065fa92 Add support for Pushbullet notifications
This commit adds the zed_notify_pushbullet() function and hooks
it into zed_notify(), thereby integrating it with the existing
"notify" ZEDLETs.  This enables ZED to push notifications to your
desktop computer and/or mobile device(s).  It is configured with the
ZED_PUSHBULLET_ACCESS_TOKEN and ZED_PUSHBULLET_CHANNEL_TAG variables
in zed.rc.

  https://www.pushbullet.com/

The Makefile install-data-local target has been replaced with
install-data-hook.  With the "-local" target, there is no particular
guarantee of execution order.  But with the zed.rc now potentially
containing sensitive information (i.e., the Pushbullet access token),
the recommended permissions have changed to 0600.  The "-hook" target
is always executed after the main rule's work is done; thus, the
chmod will always take place after the zed.rc file has been installed.

  https://www.gnu.org/software/automake/manual/automake.html#Extending

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
2015-04-27 12:08:08 -07:00
..
all-debug.sh Cleanup ZEDLETs 2015-04-27 12:08:01 -07:00
all-syslog.sh Cleanup ZEDLETs 2015-04-27 12:08:01 -07:00
checksum-notify.sh Replace "email" ZEDLETs with "notify" ZEDLETs 2015-04-27 12:08:07 -07:00
checksum-spare.sh Add automatic hot spare functionality 2014-04-02 13:10:08 -07:00
data-notify.sh Replace "email" ZEDLETs with "notify" ZEDLETs 2015-04-27 12:08:07 -07:00
generic-notify.sh Replace "email" ZEDLETs with "notify" ZEDLETs 2015-04-27 12:08:07 -07:00
io-notify.sh Replace "email" ZEDLETs with "notify" ZEDLETs 2015-04-27 12:08:07 -07:00
io-spare.sh Cleanup ZEDLETs 2015-04-27 12:08:01 -07:00
README Cleanup ZEDLETs 2015-04-27 12:08:01 -07:00
resilver.finish-notify.sh Replace "email" ZEDLETs with "notify" ZEDLETs 2015-04-27 12:08:07 -07:00
scrub.finish-notify.sh Replace "email" ZEDLETs with "notify" ZEDLETs 2015-04-27 12:08:07 -07:00
zed-functions.sh Add support for Pushbullet notifications 2015-04-27 12:08:08 -07:00
zed.rc Add support for Pushbullet notifications 2015-04-27 12:08:08 -07:00

Shell scripts are the recommended choice for ZEDLETs that mostly call
other utilities and do relatively little data manipulation.

Shell scripts MUST work on both bash and dash.

Shell scripts MUST run cleanly through ShellCheck:
  http://www.shellcheck.net/

General functions reside in "zed-functions.sh".  Use them where applicable.

Additional references that may be of use:

  Google Shell Style Guide
  https://google-styleguide.googlecode.com/svn/trunk/shell.xml

  Dash as /bin/sh
  https://wiki.ubuntu.com/DashAsBinSh

  Common shell script mistakes
  http://www.pixelbeat.org/programming/shell_script_mistakes.html

  Filenames and Pathnames in Shell: How to do it Correctly
  http://www.dwheeler.com/essays/filenames-in-shell.html

  Autoconf: Portable Shell Programming
  https://www.gnu.org/software/autoconf/manual/autoconf.html#Portable-Shell

Please BE CONSISTENT with the existing style, check for errors,
minimize dependencies where possible, try to be portable,
and comment anything non-obvious.  Festina lente.