configUpdate.sh 376 B

123456789101112
  1. #!/bin/sh
  2. ## script to run when Oboo configuration is updated
  3. # set the timezone
  4. tz=$(cat /etc/config.json | jsonfilter -e '@.config.tz')
  5. timezone=$(cat /etc/config.json | jsonfilter -e '@.config.timezone')
  6. onion time set $tz $timezone
  7. sh /usr/bin/mcu/setMcuTime.sh
  8. # let all listeners know to recheck the config file
  9. mosquitto_pub -t '/config/update' -m '{"update":true}'