Giter VIP home page Giter VIP logo

Comments (6)

DefProc avatar DefProc commented on July 4, 2024

Or would a post-update or post-receive hook allow auto updates when pushed, e.g.

  • run git push
  • hook ssh's to each doorbot in turn and runs git pull
  • success/failure info appears in the terminal during the push

Or would a separate script be better, e.g.

  • make commit and push to settings repo
  • run script to ssh to each doorbot and git pull

from doorbot-setup.

DefProc avatar DefProc commented on July 4, 2024

without having updated the reload-local-config.sh or reload-all-config.sh I have run ssh-copy-id for doorbot 1&2, so the process to pull and reload stands at:

  • ssh doorbot1
  • cd logcards/doorbot-config/
  • git pull
  • cd ../..
  • ./reload-local-config.sh
  • sudo screen -x (to check the config is fine)
  • ./reload-all-config.sh
  • exit

from doorbot-setup.

DefProc avatar DefProc commented on July 4, 2024

I've made an rfid-keyboard to allow easier collection of the RFID UIDs: https://git.defproc.co.uk/DefProc/rfid-keyboard

So now, with the device plugged in as a USB keyboard, the process to add/search though a local clone of doorbot-setup can be done without ssh'ing to a doorbot for an ID number.

from doorbot-setup.

DefProc avatar DefProc commented on July 4, 2024

Ideally, the pull should happen from the user's local repo in a script. e.g:

  • git pull the doorbots-config
  • make local changes to config.yaml
  • test the yaml is valid ( #13 )
  • commit and push the config
  • (optionally) run a script locally to ssh across to each doorbot and have it pull the config and reload
  • (alternatively) leave the doorbots to auto-pull the most recent config ( #14 )

from doorbot-setup.

DefProc avatar DefProc commented on July 4, 2024

As a way of taking steps to improve the current process, I've written a pair of scripts that automate the git pull, checking if the yaml is valid and then either copying out to the other doorbots or restoring the previous known good configuration. These are derived from, and can be used in place of the older reload-local-config and reload-all-config scripts.

In the doorbots-config repo, there is now:

  • config.yaml has been moved to _config.yaml so the original is used as the current config on the actual doorbot
  • update-rfids.sh will (when run on the doorbot):
    • pull the remote repo
    • copy the new config into position
    • run screen for you to view the loading message from the new config
    • ask you if the loading message looked correct
    • either restore the original config
    • or copy the config to the other two doorbots
  • ssh-update-rfids.sh will (when run locally from inside DoES's network) ssh over to doorbot1 and run update-rfids.sh remotely

from doorbot-setup.

amcewen avatar amcewen commented on July 4, 2024

Have changed the title on this to reflect what the issue is now about.

from doorbot-setup.

Related Issues (20)

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.