Coder Social home page Coder Social logo

sonar's Introduction

Sonar

A small Keepalive daemon for MainsailOS (or any other Raspberry Pi OS based Image).


Install

git clone https://github.com/mainsail-crew/sonar.git
cd ~/sonar
make config
sudo make install

Uninstall

cd ~/sonar
make uninstall

Updating via moonraker's update manager

Simply add

[update_manager sonar]
type: git_repo
path: ~/sonar
origin: https://github.com/mainsail-crew/sonar.git
primary_branch: main
managed_services: sonar
install_script: tools/install.sh

to your moonraker.conf

Configuration

You are able to configure it's behavior due a file in "printer_data/config/sonar.conf".
But you don't have to. Defaults are hardcoded and sonar will run without any configuration.\

Hint: sonar's configuration file is based on TOML other than in TOML colon's are also valid (and prettier :) ). Therefore a leading section descriptor is crucial!

[sonar]

Options

enable: true

If set to "false" service will exit on startup, use this option to disable Sonar service.
It will restart on reboot but exiting as long you don't change it to "true".

debug_log: false

If set to "true" service will log every attempt to reach his target.
NOTE: That will highly increase log size, this is intended for debugging purposes only.

persistant_log: false

This option allows you to store a persistant log file "/var/log/sonar.log" if set to "true"
Otherwise it will be only readable by

journalctl -u sonar

and it's not persistant!

target: auto

Your target defines which of your network devices should be target of used 'ping' command
You can use either IP Address or a URL. 'auto' will ping your default gateway (router).
INFO: Avoid using prefixes like https:// or http://

count: 3

How often should be pinged?

interval: 60

Sets interval in seconds, how long it should wait for next connection check.

restart_treshold: 10

The last option is a delay, in seconds, between shutdown WiFi Interface and bring it up again.


That's it. It is'nt the best method to keep your Wifi up and running but it is the easiest solution without changing firmware files or similar.

I hope you will find sonar useful and it blows away your connection losts :)

Contributing

See How to contribute?

sonar's People

Contributors

kwadfan avatar fjpanag avatar fire1ce avatar

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.