install.inc 817 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. hestia_module_dummy_install() {
  3. source $HESTIA/bin/module/func.inc
  4. if hestia_module_isinstalled 'dummy'; then
  5. echo "Dummy module is already installed. See 'hestia module info dummy'."
  6. return 1
  7. fi
  8. echo "Installing Dummy module..."
  9. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'installed' '1'
  10. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'description' 'Hestia Dummy module'
  11. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'enabled' '0'
  12. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'variant' 'crash-test-dummy'
  13. osal_kv_write $HESTIA_CONF_MODULES/dummy.conf 'version' '4'
  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_install $@