Нет описания

1-agent 986B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #!/usr/bin/with-contenv bash
  2. ##############################################################################
  3. # Migration sequence
  4. # Detect if there is a mounted volume on /wazuh-migration and copy the data
  5. # to /var/ossec, finally it will create a flag ".migration-completed" inside
  6. # the mounted volume
  7. ##############################################################################
  8. function __colortext()
  9. {
  10. echo -e " \e[1;$2m$1\e[0m"
  11. }
  12. function echogreen()
  13. {
  14. echo $(__colortext "$1" "32")
  15. }
  16. function echoyellow()
  17. {
  18. echo $(__colortext "$1" "33")
  19. }
  20. function echored()
  21. {
  22. echo $(__colortext "$1" "31")
  23. }
  24. function_entrypoint_scripts() {
  25. # It will run every .sh script located in entrypoint-scripts folder in lexicographical order
  26. if [ -d "/entrypoint-scripts/" ]
  27. then
  28. for script in `ls /entrypoint-scripts/*.sh | sort -n`; do
  29. bash "$script"
  30. done
  31. fi
  32. }
  33. # run entrypoint scripts
  34. function_entrypoint_scripts
  35. # Start Wazuh
  36. /var/ossec/bin/wazuh-control start