Skip to content

Saarlandpower/meshbot-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

meshbot-admin

Kleines Bash-Admin-Tool für den Betrieb eines MeshCore-basierten Bots unter systemd.

Funktionen

  • Service-Status prüfen
  • Logs anzeigen oder folgen
  • Start, Stop und Restart
  • systemd-Unit und Override anzeigen
  • Environment prüfen
  • Host-Health prüfen
  • Serial-Geräte und Besitzer prüfen
  • NINA- und OpenWeather-Erreichbarkeit testen
  • Schnell-Diagnose per doctor
  • Backup von /opt/MeshCore erzeugen

Befehle

meshbot-admin commands:
  status        Show service, process, and serial lock info
  restart       Restart bot service
  stop          Stop bot service
  start         Start bot service
  logs [N]      Show last N journal lines (default 100)
  follow        Follow live journal logs
  config        Show unit + override config
  env           Show systemd environment
  tree          List project files under /opt/MeshCore
  health        Host health summary
  serial        Show serial devices
  nina          Check DNS/HTTPS reachability for NINA
  doctor        Combined quick diagnostics
  backup        Create tar.gz backup path output
  help          Show this help

Installation

sudo install -m 0755 meshbot-admin /usr/local/bin/meshbot-admin

Danach:

meshbot-admin help
meshbot-admin status
meshbot-admin doctor

Hinweise

Standardmäßig ist das Tool auf einen konkreten MeshCore-Bot-Service zugeschnitten:

  • Service: saarmesh-bot-mc.service
  • App-Pfad: /opt/MeshCore
  • systemd Override: /etc/systemd/system/saarmesh-bot-mc.service.d/override.conf
  • Unit: /etc/systemd/system/saarmesh-bot-mc.service
  • Serial: /dev/serial/by-id/usb-Silicon_Labs_CP2102_USB_to_UART_Bridge_Controller_0001-if00-port0
  • NINA-Host: warnung.bund.de

Die wichtigsten Pfade und Hosts lassen sich per Umgebungsvariablen überschreiben:

  • MESHBOT_SERVICE
  • MESHBOT_APP_DIR
  • MESHBOT_OVERRIDE
  • MESHBOT_UNIT
  • MESHBOT_SERIAL
  • MESHBOT_NINA_HOST
  • MESHBOT_OPENWEATHER_HOST

Lizenz

MIT

About

Bash admin CLI for operating a MeshCore bot under systemd — status, logs, health checks, backups

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages