list.inc 883 B

1234567891011121314151617181920212223242526
  1. #!/bin/sh
  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 module is not installed. See 'hestia module info php'."
  7. return 1
  8. fi
  9. module_variant=$(hestia_module_getvariant php)
  10. if [ "$module_variant" != 'php-fpm' ] && [ ! "$param_force" ]; then
  11. echo "The installed PHP module is not FPM. See 'hestia module info php'."
  12. return 1
  13. fi
  14. echo "Present PHP (FPM) versions"
  15. for php_version in $PHP_SUPPORTED_VERSIONS; do
  16. php_withoutdot=${php_version//.}
  17. php_version_present=$(osal_kv_read $HESTIA_CONF_MODULES/php.conf "php${php_withoutdot}_present" 0)
  18. echo PHP ${php_version}: $(osal_bool_tostring $php_version_present 'present' 'not present')
  19. done
  20. return 0
  21. }