Skip to content

Latest commit

 

History

History
55 lines (38 loc) · 1.27 KB

README.md

File metadata and controls

55 lines (38 loc) · 1.27 KB

pushnotify

Dockerized push notifications on events from the unix journal. A REST notification service (i.e. Catapush) can be used.

Usage

Prerequisites

  • docker-compose
  • just
  • environment variables set in ~/.profile
    • export PHONE_NUMBER=431234567890 (first 2 digits: country code. 43 for Austria).
    • export CATAPUSH_TOKEN=abcdefgh

Install

Build the docker (aarch64 / arm64 default) :

just build

For amd64:

just build linux/amd64

Running

just run

By default, a TTY will be allocated and pushnotify will run in foreground. To run in daemon mode (background):

just run -d

Extending

To extend, just write your own handler (function handler_<handler_name>)in the push.sh. It will automatically be called by the logic.

Screenshots

alt text

Journalctl log snippet

Oct 02 10:15:07 bambam ovpn-server[1815]: 192.168.0.1:50541 [iPhone_Mihai_20210918] Peer Connection Initiated with [AF_INET]192.168.0.1:50541
Oct 02 10:16:44 bambam ovpn-server[1815]: 213.142.97.150:62531 [iPhone_Mihai_20210918] Peer Connection Initiated with [AF_INET]213.142.97.150:62531