list.inc 663 B

1234567891011121314151617181920
  1. #!/bin/bash
  2. hestia_module_php_list() {
  3. source $HESTIA/bin/module/func.inc
  4. source $HESTIA/bin/module/php/func.inc
  5. if ! hestia_module_isinstalled 'php' && [ ! "$param_force" ]; then
  6. echo "PHP (CLI) module is not installed. See 'hestia module info php'."
  7. return 1
  8. fi
  9. echo "Present PHP (CLI) versions"
  10. for php_version in $PHP_SUPPORTED_VERSIONS; do
  11. php_withoutdot=${php_version//.}
  12. php_version_present=$(osal_kv_read $HESTIA_CONF_MODULES/php.conf "php${php_withoutdot}_present" 0)
  13. echo "PHP ${php_version}: $(osal_bool_tostring $php_version_present 'present' 'not present')"
  14. done
  15. return 0
  16. }