post-refresh 587 B

1234567891011121314151617181920212223242526272829
  1. #!/usr/bin/env bash
  2. source "${SNAP}/init"
  3. logger "Running post-refresh ${SNAP_NAME} (uuid: ${UUID})"
  4. logger "Running config test"
  5. set -e
  6. CC="${SNAP_DATA}/custom_components"
  7. CCT="${SNAP_DATA}/.custom_components"
  8. if [ -d "${CCT}" ]; then
  9. if [ ! -d "${CC}" ]; then
  10. mv "${CCT}" "${CC}"
  11. fi
  12. fi
  13. #
  14. # if [ -d "${CC}" ]; then
  15. # logger "Disabling custom components"
  16. # mv "${CC}" "${CCT}"
  17. # fi
  18. #
  19. $SNAP/bin/hass --script check_config --config "${SNAP_DATA}"
  20. #
  21. # if [ -d "${CC}" ]; then
  22. # logger "Enabling custom components"
  23. # mv "${CCT}" "${CC}"
  24. # fi
  25. #
  26. # exit $RES