remove.inc 818 B

12345678910111213141516171819202122232425
  1. #!/bin/sh
  2. hestia_module_dummy_remove() {
  3. source $HESTIA/bin/module/func.inc
  4. module_installed=$(hestia_module_isinstalled dummy)
  5. if [ ! "$module_installed" ]; then
  6. echo "Dummy module is not installed. See 'hestia module info dummy'."
  7. exit 1
  8. fi
  9. echo "Removing Dummy module..."
  10. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'installed' '0'
  11. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'description' ''
  12. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'enabled' '0'
  13. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'variant' ''
  14. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'version' '0'
  15. exit 0
  16. }
  17. # If this files is _not_ being sourced, act immediately
  18. # (otherise, wait for hestia cli to call the main function)
  19. [[ $_ == $0 ]] && hestia_module_dummy_remove $@