remove.inc 776 B

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