Skip to content
This repository has been archived by the owner on Feb 19, 2021. It is now read-only.

CosmiCloud/OTPushNotifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OTPushNotifications

THESE NOTIFIcATIONS ARE OBSOLETE AND WILL NOT BE MAINTAINED. PLEASE DOWNLOAD THE COSMIC INStALLER AND RUN TELEGRAM NOTIFICATiONS INSTEAD.

This will help you set up a cron job that runs every 5 minutes (or any frequency you desire) that will search your otnode logs for specific phrases. A Notifiction will be sent to you with the log lines that we're found and are not older than 5 minutes(adjustable). If no results are returned, then a notification will not be sent.
By customizing the json config, you can configure the script to notify you about anything you want.


Install the 'Notify My Device' app from the app store and install it onto your mobile device.

Navigate to https://www.notifymydevice.com/ and create an account. Go to 'My applications' and create an application. Copy the API key and save it for later.

On your node:
Install npm, nodejs

  • sudo apt install npm
  • sudo apt install nodejs

Create and edit a config.json file in your directory and copy the configuration from the example-config.json file.

  1. Sudo nano config.json
  2. Paste and edit the text from the example-config.json file into your config.json file

Add a Cron job to the bottom of your crontab to trigger the script. Test running the command before adding it to your crontab.

  1. Sudo nano /etc/crontab
  2. Edit and Paste the command below to the end of your crontab

*/5 * * * * root cd ~/path/to/my/script && node Notification.js

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published