remove.inc 992 B

123456789101112131415161718192021222324252627282930
  1. #!/bin/sh
  2. hestia_module_php_remove() {
  3. source $HESTIA/bin/module/func.inc
  4. module_installed=$(hestia_module_isinstalled php)
  5. if [ ! "$module_installed" ] && [ ! "$param_force" ]; then
  6. echo "PHP module is not installed. See 'hestia module info php'."
  7. exit 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. exit 1
  13. fi
  14. echo "Removing PHP (FPM) module..."
  15. # TODO: Remove all added versions
  16. osal_kv_write $HESTIA/conf/hestia.conf 'WEB_BACKEND' 'no'
  17. osal_kv_write $HESTIA_CONF_MODULES/php.conf 'installed' '0'
  18. osal_kv_write $HESTIA_CONF_MODULES/php.conf 'description' ''
  19. osal_kv_write $HESTIA_CONF_MODULES/php.conf 'enabled' '0'
  20. osal_kv_write $HESTIA_CONF_MODULES/php.conf 'variant' ''
  21. osal_kv_write $HESTIA_CONF_MODULES/php.conf 'version' '0'
  22. exit 0
  23. }