Merge pull request #58 from forana/custom-hooks

Allow custom scripts or commands before service start
This commit is contained in:
AlfonsoRBJ
2018-10-30 13:00:00 +01:00
committed by GitHub
3 changed files with 29 additions and 0 deletions
+13
View File
@@ -113,4 +113,17 @@ trap "ossec_shutdown; exit" SIGINT SIGTERM
chmod -R g+rw ${DATA_PATH}
##############################################################################
# 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".
##############################################################################
for CUSTOM_COMMAND in "$@"
do
echo "Executing command \`${CUSTOM_COMMAND}\`"
exec_cmd_stdout "${CUSTOM_COMMAND}"
done
/sbin/my_init