list.inc 641 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. hestia_module_list() {
  3. source $HESTIA/bin/module/func.inc
  4. printf "%-16s %-12s %-4s %s\n" "Module" "Provides" "Inst" "Description"
  5. for hmd in $HESTIA_INSTALL_DIR/../modules/*.hmd; do
  6. local mod_name=$(osal_kv_read $hmd 'name')
  7. local mod_provides=$(osal_kv_read $hmd 'provides')
  8. local mod_descr=$(osal_kv_read $hmd 'description')
  9. if $(hestia_module_isinstalled $mod_name); then
  10. local mod_installed='Yes'
  11. else
  12. local mod_installed='No'
  13. fi
  14. printf "%-16s %-12s %-4s %s\n" "$mod_name" "$mod_provides" "$mod_installed" "$mod_descr"
  15. done
  16. }