Bugsounet Coding

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular

    config edit and restore one liners

    General Discussion
    2
    2
    18
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D
      dvbit Donators last edited by

      If modify often your config you may like this 2 little scripts

      mmce

      cp /home/pi/MagicMirror/config/config.js /home/pi/MagicMirror/config/config.jsbak
      vi /home/pi/MagicMirror/config/config.js
      cd /home/pi/MagicMirror
      npm run config:check

      mmcr
      cp /home/pi/MagicMirror/config/config.jsbak /home/pi/MagicMirror/config/config.js

      I put in .sh an alias and I do the editing with mmce
      it simply creates a backup and checks the config

      if everything works I launch mm

      if not a mmcr will restore previous version

      simple but handy

      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by

        Humm when i see this …
        I will code a new part with my Gateway app:

        • Edit MagicMirror configuration (only modules/plugins)
        • Naturally, you can consult, modify and apply it
        • I plan to save it and make save of config 🙂
        • maybe consult save and apply it (if needed)
        • Before save … verify syntax (prevent crash)

        simple … and Lazy 😉

        1 Reply Last reply Reply Quote 0
        • First post
          Last post
        Powered by NodeBB | @bugsounet ©2022