| 1234567891011121314151617181920212223242526272829303132 |
- #!/bin/bash
- hestia_module_php_remove() {
- source $HESTIA/bin/module/func.inc
- source $HESTIA/bin/module/php/func.inc
- if ! hestia_module_isinstalled 'php' && [ ! "$param_force" ]; then
- echo "PHP module is not installed. See 'hestia module info php'."
- return 0
- fi
- echo "Removing PHP module..."
- # Remove all added versions
- # FIXME: this will not remove unsupported but installed PHP versions
- # (i.e. supported by an older version of Hestia)
- for php_version in $PHP_SUPPORTED_VERSIONS; do
- php_withoutdot=${php_version//.}
- php_version_present=$(osal_kv_read $HESTIA_CONF_MODULES/php.conf "php${php_withoutdot}_present" '')
- if [ "$php_version_present" ]; then
- hestia module php del $php_version
- fi
- done
- osal_kv_write $HESTIA/conf/hestia.conf 'WEB_BACKEND' 'no'
- osal_kv_write $HESTIA_CONF_MODULES/php.conf 'installed' '0'
- osal_kv_write $HESTIA_CONF_MODULES/php.conf 'description' ''
- osal_kv_write $HESTIA_CONF_MODULES/php.conf 'enabled' '0'
- osal_kv_write $HESTIA_CONF_MODULES/php.conf 'version' '0'
- return 0
- }
|