remove.inc 1007 B

1234567891011121314151617181920212223242526272829
  1. #!/bin/bash
  2. hestia_module_apache_remove() {
  3. source $HESTIA/bin/module/func.inc
  4. module_installed=$(hestia_module_isinstalled apache)
  5. if [ ! "$module_installed" ] && [ ! "$param_force" ]; then
  6. echo "Apache module is not installed. See 'hestia module info apache'."
  7. exit 1
  8. fi
  9. echo "Removing Apache module..."
  10. osal_service_stop $OSAL_SERVICE_APACHE > /dev/null 2>&1
  11. osal_service_disable $OSAL_SERVICE_APACHE > /dev/null 2>&1
  12. hestia_config_backup 'apache-remove' $OSAL_PATH_APACHE_CONF
  13. osal_package_remove $OSAL_PKG_APACHE
  14. osal_kv_write $HESTIA_CONF_MODULES/apache.conf 'installed' '0'
  15. osal_kv_write $HESTIA_CONF_MODULES/apache.conf 'description' ''
  16. osal_kv_write $HESTIA_CONF_MODULES/apache.conf 'enabled' '0'
  17. osal_kv_write $HESTIA_CONF_MODULES/apache.conf 'variant' ''
  18. osal_kv_write $HESTIA_CONF_MODULES/apache.conf 'version' '0'
  19. # Setup web module (depending on Nginx and/or Apache config)
  20. $BIN/hestia module web setup
  21. }