list.inc 923 B

123456789101112131415161718192021222324252627
  1. #!/bin/sh
  2. hestia_module_php_list() {
  3. source $HESTIA/bin/module/func.inc
  4. source $HESTIA/bin/module/php/func.inc
  5. module_installed=$(hestia_module_isinstalled php)
  6. if [ ! "$module_installed" ] && [ ! "$param_force" ]; then
  7. echo "PHP module is not installed. See 'hestia module info php'."
  8. exit 1
  9. fi
  10. module_variant=$(hestia_module_getvariant php)
  11. if [ "$module_variant" != 'php-fpm' ] && [ ! "$param_force" ]; then
  12. echo "The installed PHP module is not FPM. See 'hestia module info php'."
  13. exit 1
  14. fi
  15. echo "Present PHP (FPM) versions"
  16. for php_version in $PHP_SUPPORTED_VERSIONS; do
  17. php_withoutdot=${php_version//.}
  18. php_version_present=$(osal_kv_read $HESTIA_CONF_MODULES/php.conf "php${php_withoutdot}_present" 0)
  19. echo PHP ${php_version}: $(osal_bool_tostring $php_version_present 'present' 'not present')
  20. done
  21. exit 0
  22. }