Pushover Help


Recommended Posts

hi guys, im setup the notification with pushover but is no working

 

i click enable then fill up the User Key, the app token, click apply then the pages reload and it just reset to blank again and no info get saving, i try like 4 times and have same results, i have select agent on Available notifications, can someone please tell me what im doing wrong

 

thanks in advanced

Link to comment

It's broken right now. You can add a pushover.sh file in /boot/config/plugins/dynamix/notifications/agents with this content:

 

#!/bin/bash
############
USER_KEY=""
APP_TOKEN=""
MESSAGE="$SUBJECT\n$DESCRIPTION"
############
MESSAGE=$(echo -e "$MESSAGE")
case "$IMPORTANCE" in
      'normal' )
        PRIORITY="-1"
      ;;
      'warning' )
        PRIORITY="0"
      ;;
      'alert' )
         PRIORITY="1"
      ;;
esac

curl -k -s \
      -F "token=$APP_TOKEN" \
      -F "user=$USER_KEY" \
      -F "message=$MESSAGE" \
      -F "timestamp=$TIMESTAMP" \
      -F "priority=$PRIORITY" \
      -F "html=1" \
      https://api.pushover.net/1/messages.json 2>&1

 

Please add the USER_KEY and APP_TOKEN variables.

Link to comment

sorry is no working for me

 

i add the .sh file, on the USER_KEY="" do i have to remove the quotation marks?

and do i have to add the key here too -F "token=$HERE" \

 

thanks in advance

No and no.

 

Make sure you are using a text editor that will correctly save a file with Linux line endings. Notepad will not work. Many recommend Notepad++ which you will have to download.

Link to comment

yeah is no working, i see now on the notification settings all my info, but i click test and nothing happen i am 100% sure i setup the right pushover info so i know thats no the problem, sorry but what do you mean with post the results, sorry english no my first language and thanks for you help

Link to comment

yeah is no working, i see now on the notification settings all my info, but i click test and nothing happen i am 100% sure i setup the right pushover info so i know thats no the problem, sorry but what do you mean with post the results, sorry english no my first language and thanks for you help

Can you telnet?
Link to comment

#!/bin/bash

############

USER_KEY=""

APP_TOKEN=""

MESSAGE="$SUBJECT\n$DESCRIPTION"

############

MESSAGE=$(echo -e "$MESSAGE")

case "$IMPORTANCE" in

      'normal' )

        PRIORITY="-1"

      ;;

      'warning' )

        PRIORITY="0"

      ;;

      'alert' )

        PRIORITY="1"

      ;;

esac

 

curl -k -s \

      -F "token=$APP_TOKEN" \

      -F "user=$USER_KEY" \

      -F "message=$MESSAGE" \

      -F "timestamp=$TIMESTAMP" \

      -F "priority=$PRIORITY" \

      -F "html=1" \

      https://api.pushover.net/1/messages.json 2>&1root@Server:~#

 

i type this on putty cat /boot/config/plugins/dynamix/notifications/agents/pushover.sh, dont know if this is what you mean, i remove the keys

 

Link to comment

Not sure if that really tells me anything or not. I was mostly just trying to discover if you had ^M at the end-of-lines which would have indicated DOS line endings. Since I don't know how you got the output of the cat into your post I don't know any more than before. If you're sure you know how to save a Linux-line-ending text file with notepad++ I guess we can skip that.

 

What happens if you run the script from the command line?

Link to comment

the way i save on note++, is save ass .sh file i dont know if that the right way to do it, sorry command line from where?

 

i test and send me a message from the pushover site and i got the message so i know for sure the info is correct

Link to comment

It's broken right now. You can add a pushover.sh file in /boot/config/plugins/dynamix/notifications/agents with this content:

 

#!/bin/bash
############
USER_KEY=""
APP_TOKEN=""
MESSAGE="$SUBJECT\n$DESCRIPTION"
############
MESSAGE=$(echo -e "$MESSAGE")
case "$IMPORTANCE" in
      'normal' )
        PRIORITY="-1"
      ;;
      'warning' )
        PRIORITY="0"
      ;;
      'alert' )
         PRIORITY="1"
      ;;
esac

curl -k -s \
      -F "token=$APP_TOKEN" \
      -F "user=$USER_KEY" \
      -F "message=$MESSAGE" \
      -F "timestamp=$TIMESTAMP" \
      -F "priority=$PRIORITY" \
      -F "html=1" \
      https://api.pushover.net/1/messages.json 2>&1

 

Please add the USER_KEY and APP_TOKEN variables.

 

If you actually attached this file up to a post it might help the OP to get it properly edited.  (I think you will have to add 'txt' to the file name so that you can upload it.)

Link to comment

the way i save on note++, is save ass .sh file i dont know if that the right way to do it, sorry command line from where?

 

i test and send me a message from the pushover site and i got the message so i know for sure the info is correct

 

I requested that gfjardim post up his file for you to use.  You might want to use EditPad Lite to edit it.  EditPad lite will 'look' at the actual file and figures out which of the line-ending combinations is required and uses the proper one!

Link to comment

thanks guys, i try editpad lite and got the same results, i hope that gfjardim can help me and upload the file

 

anyways thanks for you help

 

In EditPad lite, open up the file.  Make any editing changes that you require.  On the tool bar, click on the '  Convert '  menu.  Now select the ' To UNIX (LF only) ' choice in the dropdown box.  Now save the file.    (This does assume that you are using the English version of EditPad lite.)

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.