forked from wazuh/wazuh-docker
Remove legacy code to run cmd on entrypoint
This commit is contained in:
@@ -126,21 +126,6 @@ function ossec_shutdown(){
|
|||||||
${WAZUH_INSTALL_PATH}/bin/ossec-control stop;
|
${WAZUH_INSTALL_PATH}/bin/ossec-control stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
##############################################################################
|
|
||||||
# Interpret any passed arguments (via docker command to this entrypoint) as
|
|
||||||
# paths or commands, and execute them.
|
|
||||||
#
|
|
||||||
# This can be useful for actions that need to be run before the services are
|
|
||||||
# started, such as "/var/ossec/bin/ossec-control enable agentless".
|
|
||||||
##############################################################################
|
|
||||||
|
|
||||||
docker_custom_args() {
|
|
||||||
for CUSTOM_COMMAND in "$@"
|
|
||||||
do
|
|
||||||
echo "Executing command \`${CUSTOM_COMMAND}\`"
|
|
||||||
exec_cmd_stdout "${CUSTOM_COMMAND}"
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
# Main function
|
# Main function
|
||||||
@@ -171,9 +156,6 @@ main() {
|
|||||||
# Trap exit signals and do a proper shutdown
|
# Trap exit signals and do a proper shutdown
|
||||||
trap "ossec_shutdown; exit" SIGINT SIGTERM
|
trap "ossec_shutdown; exit" SIGINT SIGTERM
|
||||||
|
|
||||||
# Execute custom args
|
|
||||||
docker_custom_args
|
|
||||||
|
|
||||||
# Delete temporary data folder
|
# Delete temporary data folder
|
||||||
rm -rf ${WAZUH_INSTALL_PATH}/data_tmp
|
rm -rf ${WAZUH_INSTALL_PATH}/data_tmp
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user