remove.inc 709 B

1234567891011121314151617181920212223
  1. #!/bin/bash
  2. hestia_module_php-fpm_remove() {
  3. source $HESTIA/bin/module/func.inc
  4. source $HESTIA/bin/module/php/func.inc
  5. if ! hestia_module_isinstalled 'php-fpm' && [ ! "$param_force" ]; then
  6. echo "PHP (FPM) module is not installed. See 'hestia module info php-fpm'."
  7. return 0
  8. fi
  9. for php_version in $PHP_SUPPORTED_VERSIONS; do
  10. php_withoutdot=${php_version//.}
  11. php_version_present=$(osal_kv_read $HESTIA_CONF_MODULES/php-fpm.conf "php${php_withoutdot}_present" 0)
  12. if [ "php_version_present" ]; then
  13. hestia module php-fpm del $php_version
  14. fi
  15. done
  16. osal_kv_write $HESTIA/conf/hestia.conf 'WEB_BACKEND' 'no'
  17. return 0
  18. }