Coder Social home page Coder Social logo

crhbetz / mp-activityfile Goto Github PK

View Code? Open in Web Editor NEW
2.0 2.0 1.0 31 KB

MAD plugin to touch a .active file when there is an active connection to RGC on a device, write devices IPs to a file

License: GNU Affero General Public License v3.0

Python 83.02% HTML 16.98%
mad-plugin

mp-activityfile's Introduction

mp-activityFile

MAD plugin to touch a .active file when there is an active connection to RGC on a device and/or write device IPs to a .ips file.

Attention - 3.0 breaking change (MAD scalability / asyncio)

Version 3.0+ of this plugin has been reworked to operate on the MAD scalability update (currently as of Nov. 2021 on MAD branch redis_mitm_mapper), which relies on asyncio. I have no plans for backwards compatability.

Description

This very simple plugin will touch a file called $origin.active in the folder you configured as files-folder in MAD (default: files/ inside your MAD folder) for every device that currently has RGC connected to MAD. Thus, you can identify a devices RGC connection status by looking at the last-modified time of the corresponding .active file.

This differs from the info you can get from the MADmin status page, as the status page only denotes the last time of successful data transmission from PogoDroid.

In another file called $origin.ips, it will store internal and external IPs of your devices separated by a comma.

Setup

The plugin should work out of the box. In the plugin.ini file, you can set the check interval in seconds and disable the logline showing all "touched" device-files with the time of the last data from RGC. Either mode can be disabled by setting the corresponding interval to 0. You can add a new section - where the name of the section is the status-name you set in MADs config - to configure the following values per instance (showing the default values):

[settings]
activityinterval = 60
ipinterval = 1800
successlog = True
iplog = False

mp-activityfile's People

Contributors

crhbetz avatar

Stargazers

Axi avatar mimik avatar

Watchers

mimik avatar  avatar

Forkers

jinnatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.