v-update-sys-defaults 1.1 KB

123456789101112131415161718192021222324252627282930313233343536
  1. #!/bin/bash
  2. # info: update default key database
  3. # options: [SYSTEM]
  4. # labels:
  5. #
  6. # example: v-update-sys-defaults
  7. # example: v-update-sys-defaults user
  8. #
  9. # The function updates the known key/value pair database
  10. system=$1
  11. # Includes
  12. # shellcheck source=/usr/local/hestia/func/main.sh
  13. source $HESTIA/func/main.sh
  14. # shellcheck source=/usr/local/hestia/func/syshealth.sh
  15. source $HESTIA/func/syshealth.sh
  16. #----------------------------------------------------------#
  17. # Action #
  18. #----------------------------------------------------------#
  19. if [ ! -z "$system" ]; then
  20. syshealth_update_${system}_config_format
  21. else
  22. syshealth_update_web_config_format
  23. syshealth_update_mail_config_format
  24. syshealth_update_dns_config_format
  25. syshealth_update_db_config_format
  26. syshealth_update_user_config_format
  27. fi
  28. #----------------------------------------------------------#
  29. # Hestia #
  30. #----------------------------------------------------------#
  31. log_event "$OK" "$ARGUMENTS"