pushover notification now do not generate sound and vibration for CLEAR notifications
Costa Tsaousis (ktsaou) committed
Sep 16, 2016 at 00:01 UTC
f4d36071529d7884ffca08b7a8479e6478475af8
1 file changed
+8
-2
plugins.d/alarm-notify.sh
+8
-2
@@ -297,8 +297,14 @@ send_pushover() {
297
if [ "${SEND_PUSHOVER}" = "YES" -a ! -z "${apptoken}" -a ! -z "${usertokens}" -a ! -z "${title}" -a ! -z "${message}" ]
298
then
299
300
- priority=0
301
- [ "${status}" = "CRITICAL" ] && priority=1
300
+ # https://pushover.net/api
301
+ priority=-2
302
+ case "${status}" in
303
+ CLEAR) priority=-1;; # low priority: no sound or vibration
304
+ WARNING) priotity=0;; # normal priority: respect quiet hours
305
+ CRITICAL) priority=1;; # high priority: bypass quiet hours
306
+ *) priority=-2;; # lowest priority: no notification at all
307
+ esac
308
309
for user in ${usertokens}
310
do